Skip to content

Commit

Permalink
AER-6781 - release short-query reservations when non-replica with dat…
Browse files Browse the repository at this point in the history
…a drops the data.
  • Loading branch information
gooding470 committed Nov 12, 2024
1 parent 9cf8ca1 commit f26260f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions as/src/fabric/partition_balance.c
Original file line number Diff line number Diff line change
Expand Up @@ -614,10 +614,13 @@ as_partition_migrations_all_done(as_namespace* ns, uint32_t pid,
return AS_MIGRATE_AGAIN;
}

bool swizzle = false;

// Not a replica and non-null version ...
if (! is_self_replica(p) && ! as_partition_version_is_null(&p->version)) {
// ... and not quiesced - drop partition.
if (drop_superfluous_version(p, ns)) {
swizzle = true;
drop_trees(ns, p);
as_storage_save_pmeta(ns, p);
}
Expand All @@ -629,6 +632,10 @@ as_partition_migrations_all_done(as_namespace* ns, uint32_t pid,

cf_mutex_unlock(&p->lock);

if (swizzle) {
as_query_job_release_rsvs(ns);
}

return AS_MIGRATE_OK;
}

Expand Down

0 comments on commit f26260f

Please sign in to comment.