Skip to content

Commit bfc5f73

Browse files
committed
Fix trb log bug
1 parent 03edf91 commit bfc5f73

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/terark/db/trbdb/trb_db_segment.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ class TrbLogger
231231
{
232232
continue;
233233
}
234-
struct BadTrbLogException : std::logic_error
234+
struct BadTrbLogException : public std::logic_error
235235
{
236236
BadTrbLogException(std::string f) : std::logic_error("TrbSegment bad log : " + f)
237237
{
@@ -413,7 +413,11 @@ class TrbLogger
413413
}
414414
if(!seqHeap.empty())
415415
{
416-
throw badLog;
416+
fprintf(stderr,
417+
"WARN: TrgSegment log incomplete , caused by unsafe shutdown . %s : %zd operation(s)\n",
418+
fileName.c_str(),
419+
seqHeap.size()
420+
);
417421
}
418422
if(pos != in.end())
419423
{

0 commit comments

Comments
 (0)