Add libfmt 10+ support (#11140)
This commit is contained in:
parent
9c795c5f52
commit
f7a443aea4
|
@ -172,7 +172,7 @@ void WorkloadBase::error(const std::string& msg) {
|
|||
fmt::print(stderr, "[{}] ERROR: {}\n", workloadId, msg);
|
||||
numErrors++;
|
||||
if (numErrors > maxErrors && !failed) {
|
||||
fmt::print(stderr, "[{}] ERROR: Stopping workload after {} errors\n", workloadId, numErrors);
|
||||
fmt::print(stderr, "[{}] ERROR: Stopping workload after {} errors\n", workloadId, numErrors.load());
|
||||
failed = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2378,7 +2378,7 @@ int statsProcessMain(Arguments const& args,
|
|||
fmt::fprintf(fp, "\"txntrace\": %d,", args.txntrace);
|
||||
fmt::fprintf(fp, "\"txntagging\": %d,", args.txntagging);
|
||||
fmt::fprintf(fp, "\"txntagging_prefix\": \"%s\",", args.txntagging_prefix);
|
||||
fmt::fprintf(fp, "\"streaming_mode\": %d,", args.streaming_mode);
|
||||
fmt::fprintf(fp, "\"streaming_mode\": %d,", static_cast<int>(args.streaming_mode));
|
||||
fmt::fprintf(fp, "\"disable_ryw\": %d,", args.disable_ryw);
|
||||
fmt::fprintf(fp, "\"transaction_timeout_db\": %d,", args.transaction_timeout_db);
|
||||
fmt::fprintf(fp, "\"transaction_timeout_tx\": %d,", args.transaction_timeout_tx);
|
||||
|
|
|
@ -3025,7 +3025,7 @@ ACTOR Future<Void> validateSpecialSubrangeRead(ReadYourWritesTransaction* ryw,
|
|||
// Test
|
||||
RangeResult testResult = wait(ryw->getRange(testBegin, testEnd, limits, Snapshot::True, reverse));
|
||||
if (testResult != expectedResult) {
|
||||
fmt::print("Reverse: {}\n", reverse);
|
||||
fmt::print("Reverse: {}\n", static_cast<bool>(reverse));
|
||||
fmt::print("Original range: [{}, {})\n", begin.toString(), end.toString());
|
||||
fmt::print("Original result:\n");
|
||||
for (const auto& kr : result) {
|
||||
|
|
|
@ -585,8 +585,8 @@ ACTOR Future<Void> updateGranuleSplitState(Transaction* tr,
|
|||
fmt::print("Updating granule {0} split state from {1} {2} -> {3}\n",
|
||||
currentGranuleID.toString(),
|
||||
parentGranuleID.toString(),
|
||||
currentState,
|
||||
newState);
|
||||
static_cast<int>(currentState),
|
||||
static_cast<int>(newState));
|
||||
}
|
||||
|
||||
Key myStateKey = blobGranuleSplitKeyFor(parentGranuleID, currentGranuleID);
|
||||
|
@ -631,8 +631,8 @@ ACTOR Future<Void> updateGranuleSplitState(Transaction* tr,
|
|||
fmt::print("Ignoring granule {0} split state from {1} {2} -> {3}\n",
|
||||
currentGranuleID.toString(),
|
||||
parentGranuleID.toString(),
|
||||
currentState,
|
||||
newState);
|
||||
static_cast<int>(currentState),
|
||||
static_cast<int>(newState));
|
||||
}
|
||||
|
||||
return Void();
|
||||
|
@ -5442,7 +5442,7 @@ ACTOR Future<Void> blobWorkerCore(BlobWorkerInterface bwInterf, Reference<BlobWo
|
|||
assignReq.keyRange.end.printable(),
|
||||
assignReq.managerEpoch,
|
||||
assignReq.managerSeqno,
|
||||
assignReq.type);
|
||||
static_cast<int>(assignReq.type));
|
||||
}
|
||||
|
||||
if (self->managerEpochOk(assignReq.managerEpoch)) {
|
||||
|
|
|
@ -3639,7 +3639,7 @@ ACTOR Future<std::pair<ChangeFeedStreamReply, bool>> getChangeFeedMutations(Stor
|
|||
req.rangeID.printable().substr(0, 6),
|
||||
req.id.toString().substr(0, 8),
|
||||
foundVersion ? "key" : "version",
|
||||
DEBUG_CF_MISSING_VERSION,
|
||||
static_cast<int64_t>(DEBUG_CF_MISSING_VERSION),
|
||||
req.range.begin.printable(),
|
||||
req.range.end.printable(),
|
||||
req.begin,
|
||||
|
@ -3659,7 +3659,7 @@ ACTOR Future<std::pair<ChangeFeedStreamReply, bool>> getChangeFeedMutations(Stor
|
|||
data->thisServerID.toString().substr(0, 4),
|
||||
req.rangeID.printable().substr(0, 6),
|
||||
req.id.toString().substr(0, 8),
|
||||
DEBUG_CF_MISSING_VERSION,
|
||||
static_cast<int64_t>(DEBUG_CF_MISSING_VERSION),
|
||||
req.range.begin.printable(),
|
||||
req.range.end.printable(),
|
||||
req.begin,
|
||||
|
|
|
@ -216,7 +216,8 @@ int main(int argc, char** argv) {
|
|||
fmt::print(stderr, "ERROR: unknown option '{}'\n", args.OptionText());
|
||||
return FDB_EXIT_ERROR;
|
||||
default:
|
||||
fmt::print(stderr, "ERROR: unknown error {} with option '{}'\n", err, args.OptionText());
|
||||
fmt::print(
|
||||
stderr, "ERROR: unknown error {} with option '{}'\n", static_cast<int>(err), args.OptionText());
|
||||
return FDB_EXIT_ERROR;
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue