Skip to content

Commit

Permalink
Add more message for ingest range check (#7850)
Browse files Browse the repository at this point in the history
close #7766
  • Loading branch information
JaySon-Huang authored Jul 27, 2023
1 parent 8caefe3 commit 7dabea2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion dbms/src/Storages/DeltaMerge/DeltaMergeStore_Ingest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -555,10 +555,12 @@ UInt64 DeltaMergeStore::ingestFiles(
{
RUNTIME_CHECK_MSG(
compare(range.getStart(), ext_file.range.getStart()) <= 0 && compare(range.getEnd(), ext_file.range.getEnd()) >= 0,
"Detected illegal region boundary: range={} file_range={} . "
"Detected illegal region boundary: range={} file_range={} keyspace={} table_id={}. "
"TiFlash will exit to prevent data inconsistency. "
"If you accept data inconsistency and want to continue the service, "
"set profiles.default.dt_enable_ingest_check=false .",
keyspace_id,
physical_table_id,
range.toDebugString(),
ext_file.range.toDebugString());
}
Expand Down
4 changes: 2 additions & 2 deletions dbms/src/Storages/Transaction/ApplySnapshot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ void KVStore::checkAndApplyPreHandledSnapshot(const RegionPtrWrap & new_region,
}

{
auto table_id = new_region->getMappedTableID();
auto keyspace_id = new_region->getKeyspaceID();
auto table_id = new_region->getMappedTableID();
if (auto storage = tmt.getStorages().get(keyspace_id, table_id); storage)
{
switch (storage->engineType())
Expand Down Expand Up @@ -600,8 +600,8 @@ RegionPtr KVStore::handleIngestSSTByDTFile(const RegionPtr & region, const SSTVi
// ignore the step of calling `ingestFiles`
if (!external_files.empty())
{
auto table_id = region->getMappedTableID();
auto keyspace_id = region->getKeyspaceID();
auto table_id = region->getMappedTableID();
if (auto storage = tmt.getStorages().get(keyspace_id, table_id); storage)
{
// Ingest DTFiles into DeltaMerge storage
Expand Down

0 comments on commit 7dabea2

Please sign in to comment.