File tree 1 file changed +3
-7
lines changed
1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -204,15 +204,11 @@ if (s.ok()) {
204
204
}
205
205
----
206
206
207
- The `WriteBatch` holds a sequence of edits to be made to the database, and these
208
- edits within the batch are applied in order.Note that we called Delete before
209
- Put so that if key1 is identical to key2, we do not end up erroneously dropping
210
- the value entirely.
207
+ 每个WriteBatch对象中能包含一系列按照顺序排列的操作,当调用Write接口时,会按照顺序原子的执行WriteBatch的所有操作。
211
208
212
- Apart from its atomicity benefits, `WriteBatch` may also be used to speed up
213
- bulk updates by placing lots of individual mutations into the same batch.
209
+ WriteBatch将一些列动作封装成一个原子操作,当需要对数据库进行多次修改时,可以将这些操作封装成一个batch,这样能有效加快这些更改。
214
210
215
- ## Synchronous Writes
211
+ == Synchronous Writes
216
212
217
213
By default, each write to leveldb is asynchronous: it returns after pushing the
218
214
write from the process into the operating system. The transfer from operating
You can’t perform that action at this time.
0 commit comments