Merge pull request #10740 from sfc-gh-jslocum/fix_tenant_watching
Fix tenant watching
This commit is contained in:
commit
e458651a04
|
@ -1459,7 +1459,7 @@ ACTOR Future<Void> monitorTenants(Reference<BlobManagerData> bmData) {
|
|||
tr->setOption(FDBTransactionOptions::LOCK_AWARE);
|
||||
wait(loadTenantMap(tr, bmData));
|
||||
|
||||
state Future<Void> watchChange = tr->watch(TenantMetadata::lastTenantId().key);
|
||||
state Future<Void> watchChange = TenantMetadata::lastTenantModification().watch(tr);
|
||||
wait(tr->commit());
|
||||
wait(watchChange);
|
||||
tr->reset();
|
||||
|
|
|
@ -845,7 +845,8 @@ private:
|
|||
// A special key to be loaded at the end:
|
||||
// Blob worker monitors lastTenantId to refresh tenant map. If we load it before
|
||||
// rest of other part of tenant metadata, Blob worker may get partial tenant map. So delay it.
|
||||
if (rows[i].key == TenantMetadata::lastTenantId().key) {
|
||||
if (rows[i].key == TenantMetadata::lastTenantId().key ||
|
||||
rows[i].key == TenantMetadata::lastTenantModification().key) {
|
||||
self->delayedRows_.push_back_deep(self->delayedRows_.arena(), rows[i]);
|
||||
} else {
|
||||
tr.set(rows[i].key, rows[i].value);
|
||||
|
|
|
@ -5075,7 +5075,7 @@ ACTOR Future<Void> monitorTenants(Reference<BlobWorkerData> bwData) {
|
|||
}
|
||||
bwData->tenantData.addTenants(tenants);
|
||||
|
||||
state Future<Void> watchChange = tr->watch(TenantMetadata::lastTenantId().key);
|
||||
state Future<Void> watchChange = TenantMetadata::lastTenantModification().watch(tr);
|
||||
wait(tr->commit());
|
||||
bwData->addGRVHistory(tr->getReadVersion().get());
|
||||
wait(watchChange);
|
||||
|
|
Loading…
Reference in New Issue