Skip to content

Commit

Permalink
Add new class Rdb_converter to expose decode API
Browse files Browse the repository at this point in the history
Upstream commit ID : fb-mysql-5.6.35/e1516e7601e5a721459ab38054a8d75091736f41
PS-6865 : Merge fb-prod201903

Summary:
This is first change for Read/Write Path refactor.
The purpose of refactor:
1. Allow others to call encode/decode directly by decoupling encode/decode
   internal data/function with ha_rocksdb
   * decode:  convert RocksDB storage format to Mysql Format
   * encode:  convert Mysql format to RocksDb storage format
2. Allow others to hook up its own encoder/decoder

This change is to move decode related data/function into Rdb_converter and
ha_rocksdb will call Rdb_converter to decode.

To Use class Rdb_converter to decode RocksDb storage data
1. create Rdb_converter instance
2. call setup_field_decoders(bitmap) or set_is_keyread_only
3. call decode(/*IN*/Rdb_key_def, /*IH*/ key_slice, /*IN*/value_slice, /*OUT*/ buffer);

Reviewed By: yizhang82

Differential Revision: D14354790

fbshipit-source-id: c5dac92b6c1
  • Loading branch information
luqun authored and oleksandr-kachan committed May 27, 2024
1 parent 7a62c7b commit 65e8415
Show file tree
Hide file tree
Showing 5 changed files with 768 additions and 515 deletions.
1 change: 1 addition & 0 deletions storage/rocksdb/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ SET(ROCKSDB_SOURCES
rdb_datadic.cc rdb_datadic.h
rdb_cf_options.cc rdb_cf_options.h
rdb_cf_manager.cc rdb_cf_manager.h
rdb_converter.cc rdb_converter.h
properties_collector.cc properties_collector.h
event_listener.cc event_listener.h
rdb_i_s.cc rdb_i_s.h
Expand Down
Loading

0 comments on commit 65e8415

Please sign in to comment.