Skip to content
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

fix(log): fix rocksdb stall condition string output #2651

Merged
merged 1 commit into from
Nov 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/storage/event_listener.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,13 @@ std::string FileCreatedReason2String(const rocksdb::TableFileCreationReason reas
}

std::string StallConditionType2String(const rocksdb::WriteStallCondition type) {
std::vector<std::string> stall_condition_strings = {"normal", "delay", "stop"};
if (static_cast<size_t>(type) < stall_condition_strings.size()) {
return stall_condition_strings[static_cast<size_t>(type)];
switch (type) {
case rocksdb::WriteStallCondition::kDelayed:
return "delay";
case rocksdb::WriteStallCondition::kStopped:
return "stop";
case rocksdb::WriteStallCondition::kNormal:
return "normal";
}
return "unknown";
}
Expand Down
Loading