Fix a few documentation errors including in public APIs (#9789)
Summary: The internal WriteBatch doc wrongly indicated which optypes are followed by varstring. Updated some optypes according to the following code:76383bea5d/db/write_batch.cc (L418-L429)
The `Iterator::Refresh()` + `DeleteRange()` bug was fixed in https://github.com/facebook/rocksdb/issues/9258; removed the warnings. `GetMergeOperands()` does populate `*number_of_operands` including upon successful return:76383bea5d/db/db_impl/db_impl.cc (L1917-L1919)
Pull Request resolved: https://github.com/facebook/rocksdb/pull/9789 Reviewed By: riversand963 Differential Revision: D35303421 Pulled By: ajkr fbshipit-source-id: 9b0e1be5f6b2e2b31461e6c33ecb5f5381824452
This commit is contained in:
parent
2876e6a13b
commit
f246e56d0a
@ -22,12 +22,13 @@
|
||||
// kTypeColumnFamilySingleDeletion varint32 varstring
|
||||
// kTypeColumnFamilyRangeDeletion varint32 varstring varstring
|
||||
// kTypeColumnFamilyMerge varint32 varstring varstring
|
||||
// kTypeBeginPrepareXID varstring
|
||||
// kTypeEndPrepareXID
|
||||
// kTypeBeginPrepareXID
|
||||
// kTypeEndPrepareXID varstring
|
||||
// kTypeCommitXID varstring
|
||||
// kTypeCommitXIDAndTimestamp varstring varstring
|
||||
// kTypeRollbackXID varstring
|
||||
// kTypeBeginPersistedPrepareXID varstring
|
||||
// kTypeBeginUnprepareXID varstring
|
||||
// kTypeBeginPersistedPrepareXID
|
||||
// kTypeBeginUnprepareXID
|
||||
// kTypeNoop
|
||||
// varstring :=
|
||||
// len: varint32
|
||||
|
@ -438,10 +438,6 @@ class DB {
|
||||
// If "end_key" comes before "start_key" according to the user's comparator,
|
||||
// a `Status::InvalidArgument` is returned.
|
||||
//
|
||||
// WARNING: Do not use `Iterator::Refresh()` API on DBs where `DeleteRange()`
|
||||
// has been used or will be used. This feature combination is neither
|
||||
// supported nor programmatically prevented.
|
||||
//
|
||||
// This feature is now usable in production, with the following caveats:
|
||||
// 1) Accumulating many range tombstones in the memtable will degrade read
|
||||
// performance; this can be avoided by manually flushing occasionally.
|
||||
@ -541,16 +537,20 @@ class DB {
|
||||
return Get(options, DefaultColumnFamily(), key, value, timestamp);
|
||||
}
|
||||
|
||||
// Returns all the merge operands corresponding to the key. If the
|
||||
// number of merge operands in DB is greater than
|
||||
// merge_operands_options.expected_max_number_of_operands
|
||||
// no merge operands are returned and status is Incomplete. Merge operands
|
||||
// returned are in the order of insertion.
|
||||
// merge_operands- Points to an array of at-least
|
||||
// Populates the `merge_operands` array with all the merge operands in the DB
|
||||
// for `key`. The `merge_operands` array will be populated in the order of
|
||||
// insertion. The number of entries populated in `merge_operands` will be
|
||||
// assigned to `*number_of_operands`.
|
||||
//
|
||||
// If the number of merge operands in DB for `key` is greater than
|
||||
// `merge_operands_options.expected_max_number_of_operands`,
|
||||
// `merge_operands` is not populated and the return value is
|
||||
// `Status::Incomplete`. In that case, `*number_of_operands` will be assigned
|
||||
// the number of merge operands found in the DB for `key`.
|
||||
//
|
||||
// `merge_operands`- Points to an array of at-least
|
||||
// merge_operands_options.expected_max_number_of_operands and the
|
||||
// caller is responsible for allocating it. If the status
|
||||
// returned is Incomplete then number_of_operands will contain
|
||||
// the total number of merge operands found in DB for key.
|
||||
// caller is responsible for allocating it.
|
||||
virtual Status GetMergeOperands(
|
||||
const ReadOptions& options, ColumnFamilyHandle* column_family,
|
||||
const Slice& key, PinnableSlice* merge_operands,
|
||||
|
@ -92,10 +92,6 @@ class Iterator : public Cleanable {
|
||||
// If supported, renew the iterator to represent the latest state. The
|
||||
// iterator will be invalidated after the call. Not supported if
|
||||
// ReadOptions.snapshot is given when creating the iterator.
|
||||
//
|
||||
// WARNING: Do not use `Iterator::Refresh()` API on DBs where `DeleteRange()`
|
||||
// has been used or will be used. This feature combination is neither
|
||||
// supported nor programmatically prevented.
|
||||
virtual Status Refresh() {
|
||||
return Status::NotSupported("Refresh() is not supported");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user