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

feat getting rid of queue creation/deletion cbs #601

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dorjesinpo
Copy link
Collaborator

  1. removing queue creation/deletion cbs
  2. a step towards converging CSL/legacy

@dorjesinpo dorjesinpo added the enhancement New feature or request label Feb 5, 2025
@dorjesinpo dorjesinpo requested a review from a team as a code owner February 5, 2025 21:16
@dorjesinpo dorjesinpo changed the title getting rid of queue creation/deletion cbs feat getting rid of queue creation/deletion cbs Feb 5, 2025
Copy link
Collaborator

@kaikulimu kaikulimu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost made a big blunder, Vitaly :)

removeRecordRaw(recHandles[idx]);
}
}
// In ANY mode, any outstanding QueueOp records are deleted
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You also need to remove the isCSL checks at

if (isCSLMode) {
const bsls::Types::Int64 numMsgs = rs->numMessages(
mqbu::StorageKey::k_NULL_KEY);
if (0 != numMsgs) {
BMQTSK_ALARMLOG_ALARM("REPLICATION")
<< clusterDescription << " Partition [" << partitionId
<< "]: Attempt to delete storage for queue [ " << uri
<< "], queueKey [" << queueKey << "] which has ["
<< numMsgs << "] outstanding messages."
<< BMQTSK_ALARMLOG_END;
if (status) {
*status = rc_QUEUE_HAS_MESSAGES;
}
return; // RETURN
}
const mqbs::ReplicatedStorage::RecordHandles& recHandles =
rs->queueOpRecordHandles();
for (size_t idx = 0; idx < recHandles.size(); ++idx) {
fs->removeRecordRaw(recHandles[idx]);
}
}
BALL_LOG_INFO << clusterDescription << ": Partition [" << partitionId
<< "], Deleting storage for queue [" << uri
<< "], queueKey [" << queueKey << "] as replica.";
fs->unregisterStorage(rs);
storageMap->erase(it);
if (status) {
*status = rc_SUCCESS;
}
return; // RETURN
}
// A specific appId is being deleted.
if (isCSLMode) {
rs->purge(appKey);
}

@kaikulimu kaikulimu assigned dorjesinpo and unassigned kaikulimu Feb 6, 2025
Copy link

@bmq-oss-ci bmq-oss-ci bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build 2463 of commit c377025 has completed with FAILURE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants