8000 display reason for error in background listener, plus ignore shutdown… · reynoldsm88/arangodb@eb22eac · GitHub
[go: up one dir, main page]

Skip to content

Commit eb22eac

Browse files
authored
display reason for error in background listener, plus ignore shutdown (arangodb#9206)
1 parent 6a07476 commit eb22eac

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

arangod/RocksDBEngine/RocksDBBackgroundErrorListener.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,12 @@ namespace arangodb {
2929
RocksDBBackgroundErrorListener::~RocksDBBackgroundErrorListener() {}
3030

3131
void RocksDBBackgroundErrorListener::OnBackgroundError(rocksdb::BackgroundErrorReason reason,
32-
rocksdb::Status*) {
32+
rocksdb::Status* status) {
33+
if (status != nullptr && status->IsShutdownInProgress()) {
34+
// this is not a relevant error, so let's ignore it
35+
return;
36+
}
37+
3338
if (!_called) {
3439
_called = true;
3540

@@ -55,8 +60,8 @@ void RocksDBBackgroundErrorListener::OnBackgroundError(rocksdb::BackgroundErrorR
5560

5661
LOG_TOPIC("fae2c", ERR, Logger::ROCKSDB)
5762
<< "RocksDB encountered a background error during a " << operation
58-
<< " operation; The database will be put in read-only "
59-
"mode, and subsequent write errors are likely";
63+
<< " operation: " << (status != nullptr ? status->ToString() : "unknown error")
64+
<< "; The database will be put in read-only mode, and subsequent write errors are likely";
6065
}
6166
}
6267

0 commit comments

Comments
 (0)
0