Fix some clang warnings on unused variables

This commit is contained in:
Jingyu Zhou 2022-11-01 15:38:47 -07:00
parent aee717f5d6
commit c127bb1c30
8 changed files with 9 additions and 19 deletions

View File

@ -42,7 +42,7 @@ ACTOR static Future<Void> produce(ParallelStream<ParallelStreamTest::TestValue>:
} }
ACTOR static Future<Void> consume(FutureStream<ParallelStreamTest::TestValue> stream, int expected) { ACTOR static Future<Void> consume(FutureStream<ParallelStreamTest::TestValue> stream, int expected) {
state int next; state int next = 0;
try { try {
loop { loop {
ParallelStreamTest::TestValue value = waitNext(stream); ParallelStreamTest::TestValue value = waitNext(stream);

View File

@ -284,7 +284,6 @@ Future<ConfigurationResult> changeConfig(Reference<DB> db, std::map<std::string,
state Key versionKey = BinaryWriter::toValue(deterministicRandom()->randomUniqueID(), Unversioned()); state Key versionKey = BinaryWriter::toValue(deterministicRandom()->randomUniqueID(), Unversioned());
state bool oldReplicationUsesDcId = false; state bool oldReplicationUsesDcId = false;
state bool warnPPWGradual = false; state bool warnPPWGradual = false;
state bool warnChangeStorageNoMigrate = false;
state bool warnRocksDBIsExperimental = false; state bool warnRocksDBIsExperimental = false;
state bool warnShardedRocksDBIsExperimental = false; state bool warnShardedRocksDBIsExperimental = false;
loop { loop {

View File

@ -3549,7 +3549,7 @@ ACTOR Future<Void> doBlobGranuleFileRequest(Reference<BlobWorkerData> bwData, Bl
continue; continue;
} }
state Reference<GranuleMetadata> metadata = m; state Reference<GranuleMetadata> metadata = m;
state Version granuleBeginVersion = req.beginVersion; // state Version granuleBeginVersion = req.beginVersion;
// skip waiting for CF ready for recovery mode // skip waiting for CF ready for recovery mode
if (!isFullRestoreMode()) { if (!isFullRestoreMode()) {
choose { choose {

View File

@ -382,7 +382,6 @@ ACTOR Future<bool> checkDataConsistency(Database cx,
// Note: this may cause some shards to be processed more than once or not at all in a non-quiescent database // Note: this may cause some shards to be processed more than once or not at all in a non-quiescent database
state int effectiveClientCount = distributed ? clientCount : 1; state int effectiveClientCount = distributed ? clientCount : 1;
state int i = clientId * (shardSampleFactor + 1); state int i = clientId * (shardSampleFactor + 1);
state int increment = (distributed && !firstClient) ? effectiveClientCount * shardSampleFactor : 1;
state int64_t rateLimitForThisRound = state int64_t rateLimitForThisRound =
*bytesReadInPrevRound == 0 *bytesReadInPrevRound == 0
? maxRate ? maxRate

View File

@ -272,9 +272,6 @@ ACTOR Future<Void> trackShardMetrics(DataDistributionTracker::SafeAccessor self,
state double lastLowBandwidthStartTime = state double lastLowBandwidthStartTime =
shardMetrics->get().present() ? shardMetrics->get().get().lastLowBandwidthStartTime : now(); shardMetrics->get().present() ? shardMetrics->get().get().lastLowBandwidthStartTime : now();
state int shardCount = shardMetrics->get().present() ? shardMetrics->get().get().shardCount : 1; state int shardCount = shardMetrics->get().present() ? shardMetrics->get().get().shardCount : 1;
state ReadBandwidthStatus readBandwidthStatus = shardMetrics->get().present()
? getReadBandwidthStatus(shardMetrics->get().get().metrics)
: ReadBandwidthStatusNormal;
state bool initWithNewMetrics = whenDDInit; state bool initWithNewMetrics = whenDDInit;
wait(delay(0, TaskPriority::DataDistribution)); wait(delay(0, TaskPriority::DataDistribution));

View File

@ -1518,8 +1518,6 @@ public:
ServerStatus* status, ServerStatus* status,
Version addedVersion) { Version addedVersion) {
state StorageServerInterface interf = server->getLastKnownInterface(); state StorageServerInterface interf = server->getLastKnownInterface();
state int targetTeamNumPerServer =
(SERVER_KNOBS->DESIRED_TEAMS_PER_SERVER * (self->configuration.storageTeamSize + 1)) / 2;
loop { loop {
state bool inHealthyZone = false; // healthChanged actor will be Never() if this flag is true state bool inHealthyZone = false; // healthChanged actor will be Never() if this flag is true
if (self->healthyZone.get().present()) { if (self->healthyZone.get().present()) {

View File

@ -836,14 +836,13 @@ private:
useDelta = false; useDelta = false;
auto thisSnapshotEnd = self->log_op(OpSnapshotEnd, StringRef(), StringRef()); auto thisSnapshotEnd = self->log_op(OpSnapshotEnd, StringRef(), StringRef());
//TraceEvent("SnapshotEnd", self->id) DisabledTraceEvent("SnapshotEnd", self->id)
// .detail("LastKey", lastKey.present() ? lastKey.get() : "<none>"_sr) .detail("CurrentSnapshotEndLoc", self->currentSnapshotEnd)
// .detail("CurrentSnapshotEndLoc", self->currentSnapshotEnd) .detail("PreviousSnapshotEndLoc", self->previousSnapshotEnd)
// .detail("PreviousSnapshotEndLoc", self->previousSnapshotEnd) .detail("ThisSnapshotEnd", thisSnapshotEnd)
// .detail("ThisSnapshotEnd", thisSnapshotEnd) .detail("Items", snapItems)
// .detail("Items", snapItems) .detail("CommittedWrites", self->notifiedCommittedWriteBytes.get())
// .detail("CommittedWrites", self->notifiedCommittedWriteBytes.get()) .detail("SnapshotSize", snapshotBytes);
// .detail("SnapshotSize", snapshotBytes);
ASSERT(thisSnapshotEnd >= self->currentSnapshotEnd); ASSERT(thisSnapshotEnd >= self->currentSnapshotEnd);
self->previousSnapshotEnd = self->currentSnapshotEnd; self->previousSnapshotEnd = self->currentSnapshotEnd;

View File

@ -2607,7 +2607,6 @@ TEST_CASE("noSim/ShardedRocksDB/Initialization") {
state IKeyValueStore* kvStore = state IKeyValueStore* kvStore =
new ShardedRocksDBKeyValueStore(rocksDBTestDir, deterministicRandom()->randomUniqueID()); new ShardedRocksDBKeyValueStore(rocksDBTestDir, deterministicRandom()->randomUniqueID());
state ShardedRocksDBKeyValueStore* rocksDB = dynamic_cast<ShardedRocksDBKeyValueStore*>(kvStore);
wait(kvStore->init()); wait(kvStore->init());
Future<Void> closed = kvStore->onClosed(); Future<Void> closed = kvStore->onClosed();
@ -2622,7 +2621,6 @@ TEST_CASE("noSim/ShardedRocksDB/SingleShardRead") {
state IKeyValueStore* kvStore = state IKeyValueStore* kvStore =
new ShardedRocksDBKeyValueStore(rocksDBTestDir, deterministicRandom()->randomUniqueID()); new ShardedRocksDBKeyValueStore(rocksDBTestDir, deterministicRandom()->randomUniqueID());
state ShardedRocksDBKeyValueStore* rocksDB = dynamic_cast<ShardedRocksDBKeyValueStore*>(kvStore);
wait(kvStore->init()); wait(kvStore->init());
KeyRangeRef range("a"_sr, "b"_sr); KeyRangeRef range("a"_sr, "b"_sr);