-
Notifications
You must be signed in to change notification settings - Fork 409
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
CalvinNeo
wants to merge
86
commits into
pingcap:master
Choose a base branch
from
CalvinNeo:big-txn-3
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
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 c2c4344
rename writeBlockByRegion to writeCommittedByRegion
CalvinNeo 4503747
template ReadList
CalvinNeo 815b236
some basic spill structure
CalvinNeo 690cf94
try decode without version
CalvinNeo b67cd19
still need to fix DecodingStorageSchemaSnapshot
CalvinNeo f56a23d
make it work in a pathetic way
CalvinNeo 0c9e50b
fmt
CalvinNeo be71bd5
make it kind of readable
CalvinNeo 82d7fe1
remote spill
CalvinNeo d8da170
tidy
CalvinNeo f595338
tidy2
CalvinNeo b6d54c5
introduce AtomicReadWriteCtx to disable decoding uncommitted data
CalvinNeo b78482d
remove useless codes
CalvinNeo 1c06f70
fix decode
CalvinNeo 99feff8
fix fap test
CalvinNeo f87956a
log
CalvinNeo 2b4116c
remove spill impl
CalvinNeo f733fc4
fmt
CalvinNeo 78f14fb
Merge branch 'master' into big-txn-1
CalvinNeo dcee203
Merge branch 'master' into big-txn-1
CalvinNeo db58a19
address
CalvinNeo 215aec1
Merge branch 'big-txn-1' of ssh://github.com/CalvinNeo/tics into big-…
CalvinNeo 5b5fc18
address
CalvinNeo ab48246
Update dbms/src/Storages/KVStore/Decode/RegionDataRead.h
CalvinNeo 57a5b6f
Update dbms/src/Storages/KVStore/Decode/RegionDataRead.h
CalvinNeo 24f1d4d
Update dbms/src/Storages/KVStore/Decode/PartitionStreams.cpp
CalvinNeo 8c2625d
Update dbms/src/Storages/KVStore/MultiRaft/Spill/RegionUncommittedDat…
CalvinNeo b1a89f4
replace has_version_column with with_version_column
CalvinNeo 2c781d1
Merge branch 'big-txn-1' of ssh://github.com/CalvinNeo/tics into big-…
CalvinNeo 8a01e3d
Update dbms/src/Storages/KVStore/MultiRaft/Spill/RegionUncommittedDat…
CalvinNeo ffeab59
fix
CalvinNeo b18c4f4
Merge branch 'big-txn-1' of ssh://github.com/CalvinNeo/tics into big-…
CalvinNeo f9f04c4
Update dbms/src/Storages/KVStore/Decode/DecodingStorageSchemaSnapshot…
CalvinNeo 902239a
address
CalvinNeo e520200
Merge branch 'big-txn-1' of ssh://github.com/CalvinNeo/tics into big-…
CalvinNeo 9467ea3
Merge branch 'master' into big-txn-1
CalvinNeo 1d3a01b
Merge branch 'master' into big-txn-1
CalvinNeo 0f2b954
f
CalvinNeo 589593a
change back
CalvinNeo 07e6705
add spill
CalvinNeo ba40684
add spill 2
CalvinNeo 24be10c
resolve some todb
CalvinNeo c0aff91
fix
CalvinNeo 125c98b
fix
CalvinNeo baada2f
intiial
CalvinNeo 481592d
Merge branch 'master' into big-txn-3
CalvinNeo 6916e34
initial
CalvinNeo ad99890
move
CalvinNeo 428a8dd
Merge branch 'big-txn-3' of ssh://github.com/CalvinNeo/tics into big-…
CalvinNeo c520009
fix
CalvinNeo 3715290
fix tests
CalvinNeo 22a58b5
move DebugRegion
CalvinNeo 7d390f7
fix
CalvinNeo 26d157a
fix
CalvinNeo f6ba84c
remove
CalvinNeo dad1e02
introduce insertWithTs
CalvinNeo 432f5b1
reduce mutMeta
CalvinNeo fd43a42
mut meta
CalvinNeo 02cfd53
f
CalvinNeo 5048e64
address comment
CalvinNeo f959782
add debug kvstore and RegionSerdeOpts
CalvinNeo 84b504b
remove some annoying friend
CalvinNeo 065a0e2
address cmt
CalvinNeo ac9f08d
move DebugRegion to debug
CalvinNeo 01a9ce2
fix fmt
CalvinNeo 5b2f954
f
CalvinNeo 41e2db7
Update dbms/src/Debug/MockKVStore/MockUtils.h
CalvinNeo c25a0a0
fix
CalvinNeo a76e686
Merge branch 'big-txn-3' of ssh://github.com/CalvinNeo/tics into big-…
CalvinNeo b7c389d
f
CalvinNeo 9a842ae
t
CalvinNeo 66f53cb
Level2Key
CalvinNeo 3ac4186
rwo level iter
CalvinNeo 0b5bce3
remove
CalvinNeo 4d57919
tidy
CalvinNeo ee5fe90
test
CalvinNeo 221b199
fmt
CalvinNeo 3400c34
Update dbms/src/Storages/KVStore/MultiRaft/RegionData.cpp
CalvinNeo 3a4baf1
convert std exception to DB::exception
CalvinNeo 5ac5f4b
Merge branch 'big-txn-3' of ssh://github.com/CalvinNeo/tics into big-…
CalvinNeo efb00b7
Merge branch 'master' into big-txn-3
CalvinNeo 34d4792
fix
CalvinNeo 5524a87
Merge branch 'big-txn-3' of ssh://github.com/CalvinNeo/tics into big-…
CalvinNeo 1e6be5d
Merge branch 'master' into big-txn-3
CalvinNeo 841c613
Merge branch 'master' into big-txn-3
CalvinNeo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ®ion; } | ||
Region * operator->() const { return ®ion; } | ||
|
||
private: | ||
Region & region; | ||
}; | ||
} // namespace DB::RegionBench |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let me try
There was a problem hiding this comment.
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...