Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KVStore: LargeTxn spill: Store kv pairs of large txns in dedicated CFs #8775

Open
wants to merge 86 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 82 commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
9575a2b
make RegionDataReadInfo easy to add fields
CalvinNeo Feb 1, 2024
c2c4344
rename writeBlockByRegion to writeCommittedByRegion
CalvinNeo Feb 1, 2024
4503747
template ReadList
CalvinNeo Feb 2, 2024
815b236
some basic spill structure
CalvinNeo Feb 2, 2024
690cf94
try decode without version
CalvinNeo Feb 2, 2024
b67cd19
still need to fix DecodingStorageSchemaSnapshot
CalvinNeo Feb 4, 2024
f56a23d
make it work in a pathetic way
CalvinNeo Feb 5, 2024
0c9e50b
fmt
CalvinNeo Feb 5, 2024
be71bd5
make it kind of readable
CalvinNeo Feb 5, 2024
82d7fe1
remote spill
CalvinNeo Feb 5, 2024
d8da170
tidy
CalvinNeo Feb 5, 2024
f595338
tidy2
CalvinNeo Feb 5, 2024
b6d54c5
introduce AtomicReadWriteCtx to disable decoding uncommitted data
CalvinNeo Feb 5, 2024
b78482d
remove useless codes
CalvinNeo Feb 5, 2024
1c06f70
fix decode
CalvinNeo Feb 5, 2024
99feff8
fix fap test
CalvinNeo Feb 5, 2024
f87956a
log
CalvinNeo Feb 6, 2024
2b4116c
remove spill impl
CalvinNeo Feb 6, 2024
f733fc4
fmt
CalvinNeo Feb 6, 2024
78f14fb
Merge branch 'master' into big-txn-1
CalvinNeo Feb 6, 2024
dcee203
Merge branch 'master' into big-txn-1
CalvinNeo Feb 6, 2024
db58a19
address
CalvinNeo Feb 6, 2024
215aec1
Merge branch 'big-txn-1' of ssh://github.com/CalvinNeo/tics into big-…
CalvinNeo Feb 6, 2024
5b5fc18
address
CalvinNeo Feb 6, 2024
ab48246
Update dbms/src/Storages/KVStore/Decode/RegionDataRead.h
CalvinNeo Feb 6, 2024
57a5b6f
Update dbms/src/Storages/KVStore/Decode/RegionDataRead.h
CalvinNeo Feb 6, 2024
24f1d4d
Update dbms/src/Storages/KVStore/Decode/PartitionStreams.cpp
CalvinNeo Feb 6, 2024
8c2625d
Update dbms/src/Storages/KVStore/MultiRaft/Spill/RegionUncommittedDat…
CalvinNeo Feb 6, 2024
b1a89f4
replace has_version_column with with_version_column
CalvinNeo Feb 6, 2024
2c781d1
Merge branch 'big-txn-1' of ssh://github.com/CalvinNeo/tics into big-…
CalvinNeo Feb 6, 2024
8a01e3d
Update dbms/src/Storages/KVStore/MultiRaft/Spill/RegionUncommittedDat…
CalvinNeo Feb 6, 2024
ffeab59
fix
CalvinNeo Feb 6, 2024
b18c4f4
Merge branch 'big-txn-1' of ssh://github.com/CalvinNeo/tics into big-…
CalvinNeo Feb 6, 2024
f9f04c4
Update dbms/src/Storages/KVStore/Decode/DecodingStorageSchemaSnapshot…
CalvinNeo Feb 6, 2024
902239a
address
CalvinNeo Feb 7, 2024
e520200
Merge branch 'big-txn-1' of ssh://github.com/CalvinNeo/tics into big-…
CalvinNeo Feb 7, 2024
9467ea3
Merge branch 'master' into big-txn-1
CalvinNeo Feb 7, 2024
1d3a01b
Merge branch 'master' into big-txn-1
CalvinNeo Feb 7, 2024
0f2b954
f
CalvinNeo Feb 19, 2024
589593a
change back
CalvinNeo Feb 19, 2024
07e6705
add spill
CalvinNeo Feb 19, 2024
ba40684
add spill 2
CalvinNeo Feb 19, 2024
24be10c
resolve some todb
CalvinNeo Feb 19, 2024
c0aff91
fix
CalvinNeo Feb 19, 2024
125c98b
fix
CalvinNeo Feb 19, 2024
baada2f
intiial
CalvinNeo Feb 19, 2024
481592d
Merge branch 'master' into big-txn-3
CalvinNeo Feb 19, 2024
6916e34
initial
CalvinNeo Feb 20, 2024
ad99890
move
CalvinNeo Feb 20, 2024
428a8dd
Merge branch 'big-txn-3' of ssh://github.com/CalvinNeo/tics into big-…
CalvinNeo Feb 20, 2024
c520009
fix
CalvinNeo Feb 20, 2024
3715290
fix tests
CalvinNeo Feb 20, 2024
22a58b5
move DebugRegion
CalvinNeo Feb 21, 2024
7d390f7
fix
CalvinNeo Feb 21, 2024
26d157a
fix
CalvinNeo Feb 21, 2024
f6ba84c
remove
CalvinNeo Feb 21, 2024
dad1e02
introduce insertWithTs
CalvinNeo Feb 21, 2024
432f5b1
reduce mutMeta
CalvinNeo Feb 21, 2024
fd43a42
mut meta
CalvinNeo Feb 21, 2024
02cfd53
f
CalvinNeo Feb 22, 2024
5048e64
address comment
CalvinNeo Feb 22, 2024
f959782
add debug kvstore and RegionSerdeOpts
CalvinNeo Feb 22, 2024
84b504b
remove some annoying friend
CalvinNeo Feb 22, 2024
065a0e2
address cmt
CalvinNeo Feb 22, 2024
ac9f08d
move DebugRegion to debug
CalvinNeo Feb 22, 2024
01a9ce2
fix fmt
CalvinNeo Feb 22, 2024
5b2f954
f
CalvinNeo Feb 22, 2024
41e2db7
Update dbms/src/Debug/MockKVStore/MockUtils.h
CalvinNeo Feb 22, 2024
c25a0a0
fix
CalvinNeo Feb 22, 2024
a76e686
Merge branch 'big-txn-3' of ssh://github.com/CalvinNeo/tics into big-…
CalvinNeo Feb 22, 2024
b7c389d
f
CalvinNeo Feb 22, 2024
9a842ae
t
CalvinNeo Feb 22, 2024
66f53cb
Level2Key
CalvinNeo Feb 23, 2024
3ac4186
rwo level iter
CalvinNeo Feb 23, 2024
0b5bce3
remove
CalvinNeo Feb 23, 2024
4d57919
tidy
CalvinNeo Feb 23, 2024
ee5fe90
test
CalvinNeo Feb 23, 2024
221b199
fmt
CalvinNeo Feb 23, 2024
3400c34
Update dbms/src/Storages/KVStore/MultiRaft/RegionData.cpp
CalvinNeo Feb 23, 2024
3a4baf1
convert std exception to DB::exception
CalvinNeo Feb 23, 2024
5ac5f4b
Merge branch 'big-txn-3' of ssh://github.com/CalvinNeo/tics into big-…
CalvinNeo Feb 23, 2024
efb00b7
Merge branch 'master' into big-txn-3
CalvinNeo Feb 23, 2024
34d4792
fix
CalvinNeo Feb 23, 2024
5524a87
Merge branch 'big-txn-3' of ssh://github.com/CalvinNeo/tics into big-…
CalvinNeo Feb 23, 2024
1e6be5d
Merge branch 'master' into big-txn-3
CalvinNeo Mar 5, 2024
841c613
Merge branch 'master' into big-txn-3
CalvinNeo Mar 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions dbms/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ add_headers_and_sources(dbms src/Databases)
add_headers_and_sources(dbms src/Debug)
add_headers_and_sources(dbms src/Debug/MockExecutor)
add_headers_and_sources(dbms src/Debug/MockKVStore)
add_headers_and_sources(dbms src/Debug/dbgKVStore)
add_headers_and_sources(dbms src/Dictionaries)
# Encryption needs to link tiflash-proxy, but we do not want to link tiflash-proxy to tiflash_common_io.
# So we put the encryption source files in dbms.
Expand Down
1 change: 1 addition & 0 deletions dbms/src/Common/FailPoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ namespace DB
M(force_set_fap_candidate_store_id) \
M(force_not_clean_fap_on_destroy) \
M(delta_tree_create_node_fail) \
M(force_write_to_large_txn_default) \
M(disable_flush_cache)

#define APPLY_FOR_PAUSEABLE_FAILPOINTS_ONCE(M) \
Expand Down
4 changes: 3 additions & 1 deletion dbms/src/Debug/MockKVStore/MockUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,13 @@ inline metapb::Region createRegionInfo(
inline RegionMeta createRegionMeta(
UInt64 id,
DB::TableID table_id,
const HandleID from = 0,
const HandleID to = 300,
std::optional<raft_serverpb::RaftApplyState> apply_state = std::nullopt)
{
return RegionMeta(
/*peer=*/createPeer(31, true),
/*region=*/createRegionInfo(id, RecordKVFormat::genKey(table_id, 0), RecordKVFormat::genKey(table_id, 300)),
/*region=*/createRegionInfo(id, RecordKVFormat::genKey(table_id, from), RecordKVFormat::genKey(table_id, to)),
/*apply_state_=*/apply_state.value_or(initialApplyState()));
}

Expand Down
26 changes: 26 additions & 0 deletions dbms/src/Debug/dbgKVStore/dbgKVStore.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Copyright 2024 PingCAP, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#include <Debug/dbgKVStore/dbgKVStore.h>
#include <Storages/KVStore/MultiRaft/RegionPersister.h>

namespace DB::RegionBench
{

RegionSerdeOpts & DebugKVStore::mutRegionSerdeOpts()
{
return kvstore.region_persister->region_serde_opts;
}

} // namespace DB::RegionBench
40 changes: 40 additions & 0 deletions dbms/src/Debug/dbgKVStore/dbgKVStore.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// Copyright 2024 PingCAP, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#pragma once

#include <Storages/KVStore/KVStore.h>
#include <Storages/KVStore/MultiRaft/RegionSerde.h>

namespace DB::RegionBench
{
struct DebugKVStore
{
DebugKVStore(KVStore & kvs)
: kvstore(kvs)
{}
KVStore * operator->() { return &kvstore; }
KVStore * operator->() const { return &kvstore; }

RegionSerdeOpts & mutRegionSerdeOpts();
template <typename RegionPtrWrap>
void onSnapshot(const RegionPtrWrap & r, RegionPtr old_region, UInt64 old_region_index, TMTContext & tmt)
{
kvstore.onSnapshot<RegionPtrWrap>(r, old_region, old_region_index, tmt);
}

private:
KVStore & kvstore;
};
} // namespace DB::RegionBench
29 changes: 29 additions & 0 deletions dbms/src/Debug/dbgKVStore/dbgRegion.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// Copyright 2024 PingCAP, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#include <Debug/dbgKVStore/dbgRegion.h>

namespace DB::RegionBench
{

RegionPtr DebugRegion::debugSplitInto(RegionMeta && meta)
{
return region.splitInto(std::move(meta));
}
RegionData & DebugRegion::debugData()
{
return region.data;
}

} // namespace DB::RegionBench
34 changes: 34 additions & 0 deletions dbms/src/Debug/dbgKVStore/dbgRegion.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// Copyright 2024 PingCAP, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#pragma once

#include <Storages/KVStore/Region.h>

namespace DB::RegionBench
{
struct DebugRegion
{
DebugRegion(RegionPtr region_ptr)
: region(*region_ptr)
{}
RegionPtr debugSplitInto(RegionMeta && meta);
RegionData & debugData();
Region * operator->() { return &region; }
Region * operator->() const { return &region; }

private:
Region & region;
};
} // namespace DB::RegionBench
9 changes: 7 additions & 2 deletions dbms/src/Debug/dbgTools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <Common/typeid_cast.h>
#include <Debug/MockTiDB.h>
#include <Debug/MockTiKV.h>
#include <Debug/dbgKVStore/dbgKVStore.h>
#include <Debug/dbgTools.h>
#include <Interpreters/Context.h>
#include <Parsers/ASTLiteral.h>
Expand Down Expand Up @@ -559,10 +560,12 @@ void concurrentBatchInsert(
Context & context)
{
TMTContext & tmt = context.getTMTContext();
auto & orig_kvs = tmt.getKVStore();
auto debug_kvs = DebugKVStore(*orig_kvs);

RegionID curr_max_region_id(InvalidRegionID);
HandleID curr_max_handle_id = 0;
tmt.getKVStore()->traverseRegions([&](const RegionID region_id, const RegionPtr & region) {
debug_kvs->traverseRegions([&](const RegionID region_id, const RegionPtr & region) {
curr_max_region_id
= (curr_max_region_id == InvalidRegionID) ? region_id : std::max<RegionID>(curr_max_region_id, region_id);
const auto range = region->getRange();
Expand All @@ -575,7 +578,9 @@ void concurrentBatchInsert(
Regions regions
= createRegions(table_info.id, concurrent_num, key_num_each_region, handle_begin, curr_max_region_id + 1);
for (const RegionPtr & region : regions)
tmt.getKVStore()->onSnapshot<RegionPtrWithBlock>(region, nullptr, 0, tmt);
{
debug_kvs.onSnapshot<RegionPtrWithBlock>(region, nullptr, 0, tmt);
}

std::list<std::thread> threads;
for (Int64 i = 0; i < concurrent_num; i++, handle_begin += key_num_each_region)
Expand Down
14 changes: 4 additions & 10 deletions dbms/src/Storages/KVStore/KVStore.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ namespace DB
{
namespace RegionBench
{
extern void concurrentBatchInsert(const TiDB::TableInfo &, Int64, Int64, Int64, UInt64, UInt64, Context &);
struct DebugKVStore;
} // namespace RegionBench
namespace DM
{
Expand All @@ -46,7 +46,7 @@ struct ExternalDTFileInfo;
namespace tests
{
class KVStoreTestBase;
}
} // namespace tests

class IAST;
using ASTPtr = std::shared_ptr<IAST>;
Expand Down Expand Up @@ -149,6 +149,7 @@ class KVStore final : private boost::noncopyable
FileUsageStatistics getFileUsageStatistics() const;
// Proxy will validate and refit the config items from the toml file.
const ProxyConfigSummary & getProxyConfigSummay() const { return proxy_config_summary; }
const RegionPersister & getRegionPersister() const { return *region_persister; }

public: // Region Management
void restore(PathPool & path_pool, const TiFlashRaftProxyHelper *);
Expand Down Expand Up @@ -258,19 +259,12 @@ class KVStore final : private boost::noncopyable
friend struct MockRaftCommand;
friend class RegionMockTest;
friend class NaturalDag;
friend void RegionBench::concurrentBatchInsert(
const TiDB::TableInfo &,
Int64,
Int64,
Int64,
UInt64,
UInt64,
Context &);
using DBGInvokerPrinter = std::function<void(const std::string &)>;
friend void dbgFuncRemoveRegion(Context &, const ASTs &, DBGInvokerPrinter);
friend void dbgFuncPutRegion(Context &, const ASTs &, DBGInvokerPrinter);
friend class tests::KVStoreTestBase;
friend class ReadIndexStressTest;
friend struct RegionBench::DebugKVStore;
struct StoreMeta
{
mutable std::mutex mu;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,10 @@ FastAddPeerProto::CheckpointIngestInfoPersisted CheckpointIngestInfo::serializeM
// Although the region is the first peer of this region in this store, we can't write it to formal KVStore for now.
// Otherwise it could be uploaded and then overwritten.
WriteBufferFromOwnString wb;
RegionPersister::computeRegionWriteBuffer(*region, wb);
RegionPersister::computeRegionWriteBuffer(
*region,
wb,
tmt.getKVStore()->getRegionPersister().getRegionSerdeOpts());
ingest_info_persisted.set_region_info(wb.releaseStr());
}
ingest_info_persisted.set_remote_store_id(remote_store_id);
Expand Down
2 changes: 1 addition & 1 deletion dbms/src/Storages/KVStore/MultiRaft/PrehandleSnapshot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ static void runInParallel(
std::shared_ptr<StorageDeltaMerge> dm_storage)
{
std::string limit_tag = part_limit.toDebugString();
auto part_new_region = std::make_shared<Region>(new_region->mutMeta().clone(), proxy_helper);
auto part_new_region = std::make_shared<Region>(new_region->getMeta().clone(), proxy_helper);
auto part_sst_stream = std::make_shared<DM::SSTFilesToBlockInputStream>(
part_new_region,
index,
Expand Down
24 changes: 19 additions & 5 deletions dbms/src/Storages/KVStore/MultiRaft/RegionCFDataBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <Storages/KVStore/MultiRaft/RegionCFDataTrait.h>
#include <Storages/KVStore/MultiRaft/RegionData.h>
#include <Storages/KVStore/MultiRaft/RegionRangeKeys.h>
#include <Storages/KVStore/MultiRaft/Spill/LargeTxnDefaultCf.h>

namespace DB
{
Expand All @@ -39,6 +40,21 @@ const TiKVValue & RegionCFDataBase<Trait>::getTiKVValue(const Value & val)
return *getTiKVValuePtr<Value>(val);
}

RegionDataRes insertWithTs(
RegionCFDataBase<RegionDefaultCFDataTrait> & default_cf,
TiKVKey && key,
TiKVValue && value,
Timestamp ts,
DupCheck mode)
{
const auto & raw_key = RecordKVFormat::decodeTiKVKey(key);
auto kv_pair = RegionDefaultCFDataTrait::genKVPairWithTs(std::move(key), ts, raw_key, std::move(value));
if (!kv_pair)
return 0;

return default_cf.doInsert(std::move(*kv_pair), mode);
}

template <typename Trait>
RegionDataRes RegionCFDataBase<Trait>::insert(TiKVKey && key, TiKVValue && value, DupCheck mode)
{
Expand All @@ -47,7 +63,7 @@ RegionDataRes RegionCFDataBase<Trait>::insert(TiKVKey && key, TiKVValue && value
if (!kv_pair)
return 0;

return insert(std::move(*kv_pair), mode);
return doInsert(std::move(*kv_pair), mode);
}

template <>
Expand All @@ -62,7 +78,7 @@ RegionDataRes RegionCFDataBase<RegionLockCFDataTrait>::insert(TiKVKey && key, Ti
}

template <typename Trait>
RegionDataRes RegionCFDataBase<Trait>::insert(std::pair<Key, Value> && kv_pair, DupCheck mode)
RegionDataRes RegionCFDataBase<Trait>::doInsert(std::pair<Key, Value> && kv_pair, DupCheck mode)
{
auto & map = data;
TiKVValue prev_value;
Expand Down Expand Up @@ -258,15 +274,12 @@ size_t RegionCFDataBase<Trait>::splitInto(const RegionRange & range, RegionCFDat
{
const auto & [start_key, end_key] = range;
size_t size_changed = 0;

{
auto & ori_map = data;
auto & tar_map = new_region_data.data;

for (auto it = ori_map.begin(); it != ori_map.end();)
{
const auto & key = getTiKVKey(it->second);

if (start_key.compare(key) <= 0 && end_key.compare(key) > 0)
{
size_changed += calcTiKVKeyValueSize(it->second);
Expand Down Expand Up @@ -329,4 +342,5 @@ typename RegionCFDataBase<Trait>::Data & RegionCFDataBase<Trait>::getDataMut()
template struct RegionCFDataBase<RegionWriteCFDataTrait>;
template struct RegionCFDataBase<RegionDefaultCFDataTrait>;
template struct RegionCFDataBase<RegionLockCFDataTrait>;
template struct RegionCFDataBase<LargeDefaultCFDataTrait>;
} // namespace DB
17 changes: 12 additions & 5 deletions dbms/src/Storages/KVStore/MultiRaft/RegionCFDataBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@

namespace DB
{

struct RegionDefaultCFDataTrait;
struct TiKVRangeKey;

using RegionRange = RegionRangeKeys::RegionRange;
using RegionDataRes = size_t;

Expand All @@ -43,7 +44,6 @@ struct RegionCFDataBase
using Status = bool;

static const TiKVKey & getTiKVKey(const Value & val);

static const TiKVValue & getTiKVValue(const Value & val);

RegionDataRes insert(TiKVKey && key, TiKVValue && value, DupCheck mode = DupCheck::Deny);
Expand All @@ -52,7 +52,7 @@ struct RegionCFDataBase

static size_t calcTiKVKeyValueSize(const TiKVKey & key, const TiKVValue & value);

size_t remove(const Key & key, bool quiet = false);
size_t remove(const Key & key, bool quiet);

static bool cmp(const Map & a, const Map & b);

Expand All @@ -68,19 +68,26 @@ struct RegionCFDataBase
size_t mergeFrom(const RegionCFDataBase & ori_region_data);

size_t serialize(WriteBuffer & buf) const;

static size_t deserialize(ReadBuffer & buf, RegionCFDataBase & new_region_data);

const Data & getData() const;

Data & getDataMut();

RegionDataRes doInsert(std::pair<Key, Value> && kv_pair, DupCheck mode = DupCheck::Deny);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this function can be keep as "private"?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let me try

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alright, i found that i can't...


private:
static bool shouldIgnoreRemove(const Value & value);
RegionDataRes insert(std::pair<Key, Value> && kv_pair, DupCheck mode = DupCheck::Deny);

private:
Data data;
};

RegionDataRes insertWithTs(
RegionCFDataBase<RegionDefaultCFDataTrait> & default_cf,
TiKVKey && key,
TiKVValue && value,
Timestamp ts,
DupCheck mode);

} // namespace DB
Loading