mirror of
https://github.com/facebook/rocksdb.git
synced 2024-11-26 07:30:54 +00:00
Update comments of WriteBatchWithIndex
Summary: Pull Request resolved: https://github.com/facebook/rocksdb/pull/4113 Differential Revision: D8814172 Pulled By: siying fbshipit-source-id: cabc31db2c74803af9b2f99329155a1086eb1b22
This commit is contained in:
parent
5cd8240b86
commit
35b38a232c
|
@ -155,6 +155,12 @@ class WriteBatchWithIndex : public WriteBatchBase {
|
|||
// The returned iterator should be deleted by the caller.
|
||||
// The base_iterator is now 'owned' by the returned iterator. Deleting the
|
||||
// returned iterator will also delete the base_iterator.
|
||||
//
|
||||
// Updating write batch with the current key of the iterator is not safe.
|
||||
// We strongly recommand users not to do it. It will invalidate the current
|
||||
// key() and value() of the iterator. This invalidation happens even before
|
||||
// the write batch update finishes. The state may recover after Next() is
|
||||
// called.
|
||||
Iterator* NewIteratorWithBase(ColumnFamilyHandle* column_family,
|
||||
Iterator* base_iterator);
|
||||
// default column family
|
||||
|
|
|
@ -114,6 +114,12 @@ public class WriteBatchWithIndex extends AbstractWriteBatch {
|
|||
* creating a new Iterator that will use {@link org.rocksdb.WBWIRocksIterator}
|
||||
* as a delta and baseIterator as a base
|
||||
*
|
||||
* Updating write batch with the current key of the iterator is not safe.
|
||||
* We strongly recommand users not to do it. It will invalidate the current
|
||||
* key() and value() of the iterator. This invalidation happens even before
|
||||
* the write batch update finishes. The state may recover after Next() is
|
||||
* called.
|
||||
*
|
||||
* @param columnFamilyHandle The column family to iterate over
|
||||
* @param baseIterator The base iterator,
|
||||
* e.g. {@link org.rocksdb.RocksDB#newIterator()}
|
||||
|
|
Loading…
Reference in a new issue