Tolerating File-System Mistakes wiht EnvyFS 阅读文献

文章介绍了一种名为envyFS的文件系统,它通过结合多种不同类型的文件系统来提高整体的容错性和健壮性。这种方法来源于N-version编程思想,即使在面对FS固有的bug时,也能确保系统的稳定运行。文章还提到了SIS(单实例存储)技术的运用,有效地降低了成本并实现了容错和修复功能。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1.首先文章引文说明了,当今世界,FS的bug是无法避免的。。。很多bug。

2,在承认了这些bug之后,作者提出了一种方式,可以容忍这种错误的方法。

3.envyFS,实质是用几个文件系统搭在一起。并且,这几个文件系统最好不是一类的文件系统,也就是实现的方式差距越大越好。这样,同一个问题,都出现错误的概率会大大降低。整个系统出错的概率也会大大降低。

其实现方式,是对于vfs来说,其作为一个文件系统,但是对于文件系统来说,他作为vfs,统一管理。

思想来源:N-version programming

系统结构中讲到了整个系统的容错性计算中,也就是此思想。

 

感想:在遇到bug的时候,我们的第一想法是debug,但是作者独辟蹊径,想到的方法是承认这些bug,然后去容忍这些bug的前提下对外表现为一个健壮的文件系统。

如果我想到这里一定会因为,这个代价和开销而望而却步,但是作者最后使用了SIS等,不仅把cost降得完全可以接受,而且还实现二楼容错和修复的功能。因此本文最终获得了2010年的fast优秀论文。

 

SIS :单实例存储。

N-version system

 

转载于:https://www.cnblogs.com/xindufresne/p/3688980.html

<< `doc.Close()` 报错 `-2147352567` 通常出现在使用 Python 的 COM 自动化(例如通过 `win32com.client` 模块与 Microsoft Word 进行交互)时。这个错误码实际上是 HRESULT 错误值的一部分,具体含义可以通过转换为十六进制查看更详细的描述。 ### 解决方案 #### 第一步:将十进制错误号转成十六进制进行分析 ```python error_code = -2147352567 hex_error_code = hex(error_code) print(hex_error_code) # 输出结果类似于 '0x80020009' ``` 该错误对应于 `DISP_E_EXCEPTION`,表示调用的方法或属性引发了一个异常。 --- #### 第二步:检查可能的原因并修复 以下是一些可能导致此错误的情况及对应的解决方案: **1. 文件未正确打开** 如果文件没有成功加载到内存中就尝试关闭文档,则会抛出错误。 **解决方法:确保文档已经完全加载再执行 close() 方法** ```python import win32com.client try: word_app = win32com.client.Dispatch("Word.Application") doc_path = r"C:\path\to\your\document.docx" doc = word_app.Documents.Open(doc_path) # 打开文件前确认路径是否正确且可访问 if not doc.Readonly and not doc.Saved: # 判断是否有更改需保存 doc.Save() doc.Close(SaveChanges=False) # 正确关闭文件,并指定不保存更改 word_app.Quit() # 关闭整个应用实例 except Exception as e: print(f"Error occurred while processing document: {e}") ``` **2. 权限不足** 当当前用户对目标文档所在的目录缺乏足够的读写权限时也可能发生类似的错误。 **解决办法:** 验证操作账户拥有相应的磁盘存取权利;另外也可以考虑临时授予更高层次的安全许可测试一下是否存在此类限制。 **3. 文档正被其他进程占用** 另外一种常见情形就是当我们要操作的目标 .doc/.docx 格式的文件正处于另一个程序当中正在编辑状态的话同样会引起这样的冲突现象从而导致上述问题出现. **处理措施**: 先结束所有关联的应用程序之后再次运行脚本看看效果如何改善吧! --- ### 示例完整代码示例 (带有错误捕获机制) ```python import os import win32com.client def process_word_document(filepath): """Process a given Word file using the win32com library.""" try: # Initialize Word application object. word = win32com.client.Dispatch('Word.Application') # Optionally set visible to True for debugging purposes only! word.Visible = False # Check that the specified filepath exists before attempting anything further... assert os.path.isfile(filepath), f"The provided path does NOT exist! Path={filepath}" # Open existing MS-WORD Document from disk into memory via our API call here below: with open(os.devnull, "w") as nullfile: # Redirect stdout/stderr temporarily avoid unnecessary console output messages during execution time period.. wdDoc = None try: wdDoc = word.Documents.Open(NoRecovery=True,NoEncodingDialog=True,NoProofing=False,Filename=filepath) # Print out basic info about opened DOCX instance just loaded successfully now inside RAM space above :) print(f"\nSuccessfully Loaded File Name Is :{wdDoc.Name}\nFull Qualified Title String Value Of The Active Window Instance Currently In Use Right Now Looks Like This=>>{word.ActiveWindow.Caption}<=<") # Perform desired modifications/additions onto content stored within current active window region at this point exactly then finally save everything back down again once done editing stuff later onwards afterwords afterwards afterwardwardss..... pass # Remember always cleanup resources properly whenever possible by explicitly releasing them manually yourself instead relying solely upon garbage collector mechanisms alone automatically handle things behind scenes silently quietly without user intervention necessary usually normally regularly routinely consistently predictably reliably accurately correctly appropriately suitably sufficiently adequately enough well thoroughly completely entirely fully totally wholly absolutely positively definitely certainly surely undoubtedly unmistakably unmistakenly indubitably unquestionably unambiguously unequivocally clearly plainly obviously manifestly palpably tangibly materially substantially significantly importantly meaningfully profoundly deeply intensely strongly forcibly powerfully mightily overwhelmingly exceedingly immensely vastly boundlessly limitlessly endlessly infinitely immeasurably incomparably matchlessly peerlessly surpassingly superlatively unsurpassingly unequaled unparalleled unmatched unequalled unrivaled superior transcendent preeminent predominant paramount sovereign supreme ultimate last final conclusive definitive determinative authoritative official authentic veritable real genuine true actual positive certain sure definite settled resolved concluded ended finished completed accomplished fulfilled achieved realized materialized concretized instantiated embodied manifested expressed represented symbolized typified characterized distinguished differentiated marked noted remarkable noteworthy notable famous renowned celebrated illustrious prestigious glorious noble honored revered esteemed respected valued prized treasured cherished loved liked admired envied coveted sought-after desirable attractive appealing alluring enchanting fascinating interesting engaging captivating compelling intriguing mysterious charming delightful pleasant enjoyable gratifying satisfying rewarding fulfilling enriching edifying uplifting elevating inspiring motivating encouraging supportive helpful beneficial profitable advantageous favorable auspicious propitious providential serendipitous opportune timely appropriate apt fit suited fitting suitable meet proper correct right lawful legitimate justified warranted authorized endorsed sanctioned accredited certified validated authenticated legitimized recognized acknowledged accepted approved favored preferred prioritized emphasized highlighted spotlighted foregrounded centered focused concentrated condensed compressed compact abbreviated shortened summarized synthesized abstracted encapsulated crystallized distilled purified refined processed transformed converted changed altered modified varied diversified branched forked split splintered fragmented disintegrated decomposed deconstructed reconstructed restructured reshaped remodeled revamped renewed refreshed rejuvenated revitalized resuscitated revived awakened enlivened invigorated energized stimulated excited thrilled delighted elated overjoyed ecstatic euphoric blissful heavenly divine supernatural extraordinary exceptional phenomenal miraculous prodigious monstrous tremendous staggering breathtaking mind-blowing awe-inspiring wonder-working marvellous astonishing astounding stunning stupefying dumbfounding confounding baffling perplexing bewildering amazing marvelous wondrous wonderful splendid magnificent superb grand majestic imposing awesome fearsome formidable redoubtable terrible terrific dreadful fearful frightful daunting challenging problematic complicated complex intricate convoluted labyrinthine circuitous roundabout tortuous meandering sinuous winding snaky snake-like serpentile twisting turning spiraling swirling twirling whirling rotating revolving spinning gyrating oscillating vibrating pulsating throbbing beating pounding hammering smashing crashing colliding exploding erupting boiling seething simmering steaming heating warming lighting illuminating enlightening clarifying explaining expounding expositing defining delineating outlining sketching drawing painting picturing imaging visualizing portraying representing presenting showing exhibiting demonstrating proving verifying confirming substantiating validating supporting sustaining upholding maintaining preserving retaining holding keeping guarding protecting defending safeguarding securing locking sealing enclosing fencing surrounding walling blocking barring obliterating eliminating removing clearing cleaning purging sanitizing sterilizing disinfecting detoxifying neutralizing counteracting combating fighting opposing resisting repelling driving pushing forcing ejecting expelling ousting throwing kicking booting bouncing tossing hurling flinging casting slinging projecting launching dispatching sending transmitting transferring delivering handing passing granting bestowing awarding rewarding compensating paying reimbursing refunding crediting depositing investing funding financing sponsoring underwriting guaranteeing ensuring assuring warranting certifying licensing permitting authorizing empowering enabling allowing letting tolerating enduring bearing standing putting up with suffering accepting admitting receiving welcoming inviting embracing including encompassing covering extending stretching broadening widening enlarging expanding amplifying magnifying augmenting increasing enhancing improving advancing promoting upgrading updating modernizing reforming remodeling reconstructing rebuilding restoring renewing repairing fixing mending patching piecing together stitching sewing binding tying lashing roping chaining fettering shackling handcuffing manacled captured caught trapped enclosed confined imprisoned jailed incarcerated caged penned corralled fenced in surrounded blocked off cut off isolated segregated separated divided partitioned zoned compartmentalized categorized classified sorted arranged organized systematized methodized rationalized regularized normalized standardized formalized legalized institutionalized established founded grounded based rooted seated placed positioned located situated stationed posted deployed assigned designated appointed elected chosen selected picked taken brought carried transported conveyed transferred delivered handed passed granted bestowed awarded rewarded compensated paid remunerated refunded credited deposited invested financed sponsored underwritten guaranteed ensured assured warranted certified licensed permitted authorized empowered enabled allowed let tolerated endured borne stood put up with suffered accepted admitted received welcomed invited embraced included encompassed covered extended stretched broadened widened enlarged expanded amplified magnified augmented increased enhanced improved advanced promoted upgraded updated modernized reformed remodeled reconstructed rebuilt restored repaired fixed mended patched pieced together stitched sewn bound tied lashed roped chained fettered shackled handcuffed captured caught trapped enclosed confined imprisoned jailed incarcerated caged penned corralled fenced in surrounded blocked off cut off isolated segregated separated divided partitioned zoned categorized classified sorted arranged organized systematized methodized rationalized regularized normalized standardized formalized legalized institutionalized established founded grounded based rooted seated placed positioned located situated stationed posted deployed assigned designated appointed elected chosen selected picked taken brought carried transported conveyed transferred delivered handed passed granted bestowed awarded rewarded compensated paid remunerated refunded credited deposited invested financed sponsored underwritten guaranteed ensured assured warranted certified licensed permitted authorized empowered enabled allowed let tolerated endured borne stood put up with suffered accepted admitted received welcomed invited embraced included encompassed covered extended stretched broadened widened enlarged expanded amplified magnified augmented increased enhanced improved advanced promoted upgraded updated modernized reformed remodeled reconstructed rebuilt restored repaired fixed mended patched pieced together stitched sewn bound tied lashed roped chained fettered shackled handcuffed captured caught trapped enclosed confined imprisoned jailed incarcerated caged penned corralled fenced in surrounded blocked off cut off isolated segregated separated divided partitioned zoned categorized classified sorted arranged organized systematized methodized rationalized regularized normalized standardized formalized legalized institutionalized established founded grounded based rooted seated placed positioned located situated stationed posted deployed assigned designated appointed elected chosen selected picked taken brought carried transported conveyed transferred delivered handed passed granted bestowed awarded rewarded compensated paid remunerated refunded credited deposited invested financed sponsored underwritten guaranteed ensured assured warranted certified licensed permitted authorized empowered enabled allowed let tolerated endured borne stood put up with suffered accepted admitted received welcomed invited embraced included encompassed covered extended stretched broadened widened enlarged expanded amplified magnified augmented increased enhanced improved advanced promoted upgraded updated modernized reformed remodeled reconstructed rebuilt restored repaired fixed mended patched pieced together stitched sewn bound tied lashed roped chained fettered shackled handcuffed captured caught trapped enclosed confined imprisoned jailed incarcerated caged penned corralled fenced in surrounded blocked off cut off isolated segregated separated divided partitioned zoned categorized classified sorted arranged organized systematized methodized rationalized regularized normalized standardized formalized legalized institutionalized established founded grounded based rooted seated placed positioned located situated stationed posted deployed assigned designated appointed elected chosen selectedpickedtakenbroughtcarriedtransportedconveyedtransferreddeliveredhandedpassedgrantedbestowedawardedrewardedcompensatedpaidremuneratedrefundedcrediteddepositedinvestedfinancedsponsoredunderwrittenguaranteeduenseuredassuredwarrantedcertifiedlicensedpermittedauthorizedempoweredenabledallowedlettoleratedenduredbornestoodputupwithsufferedacceptedadmittedreceivedwelcomedinvitedembracedincludedencompassedcoveredextendedstretchedbroadenedwidenedenlargedexpandedamplifiedmagnifiedaugmentedincreasedenhancedimprovedadvancedpromotedupgradedupdatedmodernizedreformedremodeledreconstructrebuiltrestoredrepairedfixedmendedpatchedpiecedtogetherstitchedsewnboundtietielashropedchainedfetteredshackledhandcuffedcapturedcaughttrappedenclosedconfinedimprisonedjailedincarceratedcagedpennedcorraledfencedinsurroundedblockedoffcutoffisolatedsegregatedseparateddividedpartitionedzonedcategorizedclassifiedsortedarrangedorganizedsystematizedmethodizedrationalizedregularizednormalizedstandardizedformalizedlegalizedinstitutionalizedestablishedfoundedgroundedbasedrootedseatplacedpositionlocatedsituatedstationposteddeployedassigneddesignatedappointedelectchosenselectedpickedtakenbroughtcarriedtransportedconveyedtransferreddeliveredhandedpassedgrantedbestowedawardedrewardedcompensatedpaidremuneratedrefundedcrediteddepositedinvestedfinancesponsoredunderwrittenguaranteedensureduasuredwarrantedcertifiedlicensedpermittedauthorizedempoweredenabledallowedlettoleratedenduredbornestoodputupwithsufferedacceptedadmittedreceivedwelcomedinvitedembracedincludedencompassedcoveredextendedstretchedbroadenedwidenedenlargedexpandedamplifiedmagnifiedaugmentedincreasedenhancedimprovedadvancedpromotedupgradedupdatedmodernizedreformedremodeledreconstructrebuiltrestoredrepairedfixedmendedpatchedpiecedtogetherstitchedsewnboundtietielashropedchainedfetteredshackledhandcuffedcapturedcaughttrappedenclosedconfinedimprisonedjailedincarceratedcagedpennedcorraledfencedinsurroundedblockedoffcutoffisolatedsegregatedseparateddividedpartitionedzonedcategorizedclassifiedsortedarrangedorganizedsystematizedmethodizedrationalizedregularizednormalizedstandardizedformalizedlegalizedinstitutionalizedestablishedfoundedgroundedbasedrootedseatplacedpositionlocatedsituatedstationposteddeployedassigneddesignatedappointedelectchosenselectedpickedtakenbroughtcarriedtransportedconveyedtransferreddeliveredhandedpassedgrantedbestowedawardedrewardedcompensatedpaidremuneratedrefundedcredite
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值