mirror of
https://github.com/facebook/rocksdb.git
synced 2024-11-29 18:33:58 +00:00
2a2b3e03a5
Summary: In the past, we unnecessarily requires all keys in the same write batch to be from column families whose timestamps' formats are the same for simplicity. Specifically, we cannot use the same write batch to write to two column families, one of which enables timestamp while the other disables it. The limitation is due to the member `timestamp_size_` that used to exist in each `WriteBatch` object. We pass a timestamp_size to the constructor of `WriteBatch`. Therefore, users can simply use the old `WriteBatch::Put()`, `WriteBatch::Delete()`, etc APIs for write, while the internal implementation of `WriteBatch` will take care of memory allocation for timestamps. The above is not necessary. One the one hand, users can set up a memory buffer to store user key and then contiguously append the timestamp to the user key. Then the user can pass this buffer to the `WriteBatch::Put(Slice&)` API. On the other hand, users can set up a SliceParts object which is an array of Slices and let the last Slice to point to the memory buffer storing timestamp. Then the user can pass the SliceParts object to the `WriteBatch::Put(SliceParts&)` API. Pull Request resolved: https://github.com/facebook/rocksdb/pull/8725 Test Plan: make check Reviewed By: ltamasi Differential Revision: D30654499 Pulled By: riversand963 fbshipit-source-id: 9d848c77ad3c9dd629aa5fc4e2bc16fb0687b4a2 |
||
---|---|---|
.. | ||
batched_ops_stress.cc | ||
cf_consistency_stress.cc | ||
CMakeLists.txt | ||
db_stress.cc | ||
db_stress_common.cc | ||
db_stress_common.h | ||
db_stress_compaction_filter.h | ||
db_stress_driver.cc | ||
db_stress_driver.h | ||
db_stress_env_wrapper.h | ||
db_stress_gflags.cc | ||
db_stress_listener.h | ||
db_stress_shared_state.cc | ||
db_stress_shared_state.h | ||
db_stress_stat.h | ||
db_stress_table_properties_collector.h | ||
db_stress_test_base.cc | ||
db_stress_test_base.h | ||
db_stress_tool.cc | ||
no_batched_ops_stress.cc |