版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
1、Write ConcernWrite concern describes the guarantee that MongoDB provides when reporting on the success of a write operation. The strength of the write concerns determine the level of guarantee. When inserts, updates and deletes have a weak write concern, write operations return quickly. In some fail
2、ure cases, write operations issued with weak write concerns may not persist. With stronger write concerns, clients wait after sending a write operation for MongoDB to confirm the write operations.MongoDB provides different levels of write concern to better address the specific needs of applications.
3、 Clients may adjust write concern to ensure that the most important operations persist successfully to an entire MongoDB deployment. For other less critical operations, clients can adjust the write concern to ensure faster performance rather than ensure persistence to the entire deployment.Changed i
4、n version 2.6: A new protocol for write operations integrates write concern with the write operations.For details on write concern configurations, see Write Concern Reference.ConsiderationsDefault Write ConcernThe mongo shell and the MongoDB drivers use Acknowledged as the default write concern.See
5、Acknowledged for more information, including when this write concern became the default.TimeoutsClients can set a wtimeout value as part of a replica acknowledged write concern. If the write concern is not satisfied in the specified interval, the operation returns an error, even if the write concern
6、 will eventually succeed.MongoDB does not “rollback” or undo modifications made before the wtimeout interval expired.Write Concern LevelsMongoDB has the following levels of conceptual write concern, listed from weakest to strongest:1.UnacknowledgedWith an unacknowledged write concern, MongoDB does n
7、ot acknowledge the receipt of write operations.Unacknowledged is similar to errors ignored; however, drivers will attempt to receive and handle network errors when possible. The drivers ability to detect network errors depends on the systems networking configuration.Before the releases outlined in D
8、efault Write Concern Change, this was the default write concern.2.AcknowledgedWith a receipt acknowledged write concern, the mongod confirms that it received the write operation and applied the change to the in-memory view of data. Acknowledged write concern allows clients to catch network, duplicat
9、e key, and other errors.MongoDB uses the acknowledged write concern by default starting in the driver releases outlined inReleases.Changed in version 2.6: The mongo shell write methods now incorporates the write concern in the write methods and provide the default write concern whether run interacti
10、vely or in a script. See Write Method Acknowledgements for details.Acknowledged write concern does not confirm that the write operation has persisted to the disk system.3.JournaledWith a journaled write concern, the MongoDB acknowledges the write operation only after committing the data to the journ
11、al. This write concern ensures that MongoDB can recover the data following a shutdown or power interruption.You must have journaling enabled to use this write concern.With a journaled write concern, write operations must wait for the next journal commit. To reduce latency for these operations, Mongo
12、DB also increases the frequency that it commits operations to the journal. SmitIntervalMs for more information.NOTERequiring journaled write concern in a replica set only requires a journal commit of the write operation to the primary of the set regardless of the level of replica acknowledged write concern.4.Replica AcknowledgedReplica sets present additional considerations with regards to write concern. The default write concern only requires acknowledgement from the primary
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 管理溝通學習通超星期末考試答案章節(jié)答案2024年
- minus-α-Pinene-Standard-生命科學試劑-MCE
- 貨運駕駛員勞務(wù)合同
- 部編2024版歷史七年級上冊第四單元《第18課 東晉南朝政治和江南地區(qū)開發(fā)》有關(guān)故事、軼事和傳說(學案)
- 數(shù)字鐘課課程設(shè)計廳
- 員工轉(zhuǎn)正合同(2篇)
- 化工原理課程設(shè)計粗苯
- 襯片的冷沖壓課程設(shè)計
- 消防報警系統(tǒng)維修合同
- 化肥合同范本(2篇)
- GB/T 22882-2008排球
- FZ/T 93048.2-2021針刺機用針第2部分:叉形針
- FZ/T 01101-2008紡織品纖維含量的測定物理法
- 2023年北京地區(qū)成人本科學士學位英語考試真題及參考答案
- 運輸供應(yīng)商年度評價表
- 消防安全宣傳培訓(xùn)制度(5篇)
- 沖壓工藝培訓(xùn)學習資料(非常全面)課件
- 電信服務(wù)禮儀課件
- 牛皮癬清理辦法
- 傳承·創(chuàng)新·引領(lǐng):共同體推動語文課堂教學改革探索
- 清華大學本科生各專業(yè)培養(yǎng)方案
評論
0/150
提交評論