8.2.3 prerelease testnet#4076
Conversation
… Now we are waiting for the nodes that did an ack
…cess-rate Feature/improve publish success rate
There was a problem hiding this comment.
This PR is being reviewed by Cursor Bugbot
Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| null, | ||
| this.completedStatuses, | ||
| ); | ||
| await this.repositoryModuleManager.updateMinAcksReached(operationId, true); |
There was a problem hiding this comment.
Bug: Race condition in minimum replication check
The new logic introduces a TOCTOU (time-of-check-to-time-of-use) race condition. Multiple concurrent responses can all read record?.minAcksReached as false before any of them updates it to true. Since getOperationIdRecord and updateMinAcksReached are not executed atomically (they're outside the mutex), concurrent responses that exceed minAckResponses may all proceed to call markOperationAsCompleted, potentially completing the same operation multiple times. The previous logic avoided this by only acting when totalResponses === numberOfFoundNodes, ensuring exactly one caller would reach the decision point.
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Checklist:
Note
Completes publish once minimum acknowledgements are reached (with duplicate-guard), fails when responses are exhausted, and adds stronger logging/error handling in publish finalization and Blazegraph updates; bumps version to 8.2.3.
minAckResponsesare met, independent of total responses; guards withminAcksReachedto prevent duplicate completion.PUBLISH_FAILED.src/commands/protocols/publish/publish-finalization-command.js):ualearlier; enhanced warnings when cached publish data read fails and when retry attempts are exhausted.readWithRetriesto computedatasetPathonce and log path on failure.queryVoidin try/catch with detailed error logging (HTTP status and data snippet) and rethrows.versionto8.2.3.Written by Cursor Bugbot for commit 43d08f2. This will update automatically on new commits. Configure here.