Skip to content

Commit f2ff623

Browse files
committed
update comments
1 parent 8c66226 commit f2ff623

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

dbms/src/Storages/Page/V3/PageDirectory.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,8 @@ void PageDirectory::apply(PageEntriesEdit && edit)
195195

196196
if (!updating_locks.empty())
197197
{
198-
LOG_FMT_WARNING(log, "`updating_locks` must be cleared. But there are some locks not been erased. [remain sizes={}]", updating_locks.size());
198+
throw Exception(fmt::format("`updating_locks` must be cleared. But there are some locks not been erased. [remain sizes={}]", updating_locks.size()),
199+
ErrorCodes::LOGICAL_ERROR);
199200
}
200201

201202
// The edit committed, incr the sequence number to publish changes for `createSnapshot`

dbms/src/Storages/Page/V3/tests/gtest_page_directory.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,7 @@ CATCH
294294
TEST_F(PageDirectoryTest, ApplyPutWithIdenticalPages)
295295
try
296296
{
297+
// Put identical page in different `edit`
297298
PageId page_id = 50;
298299

299300
auto snap0 = dir.createSnapshot();
@@ -325,6 +326,7 @@ try
325326
EXPECT_ENTRIES_EQ(expected_entries, dir, ids, snap2);
326327
}
327328

329+
// Put identical page within one `edit`
328330
page_id++;
329331
PageEntryV3 entry3{.file_id = 1, .size = 1024, .offset = 0x12345, .checksum = 0x4567};
330332
{

0 commit comments

Comments
 (0)