Skip to content

Conversation

@lupuszr
Copy link
Collaborator

@lupuszr lupuszr commented Dec 12, 2025

Description

  • Improved publish flow now completes as soon as the minimum acknowledgements are reached and skips redundant
    processing once minAcksReached is set, only failing when all contacted nodes have responded unsuccessfully
    (src/service/publish-service.js).
  • Cache handling logs are more descriptive and downgraded to warnings for
    cache-miss scenarios to avoid noisy errors while still emitting state changes (src/commands/protocols/publish/
    publish-finalization-command.js).
  • Blazegraph write failures now log HTTP status plus response/query snippets
    to aid debugging (src/modules/triple-store/implementation/ot-blazegraph/ot-blazegraph.js).

Note

Publish now completes once minimum acknowledgements are met (and only fails after all responses if insufficient), with clearer cache logs and enhanced Blazegraph update error reporting.

  • Publish flow (src/service/publish-service.js):
    • Complete as soon as minAckResponses is reached; skip further processing via minAcksReached guard.
    • Fail only when all contacted nodes responded and successes < minAckResponses.
    • Added concise info/warn logs and response summary.
  • Publish finalization/cache (src/commands/protocols/publish/publish-finalization-command.js):
    • Derive ual earlier for logging/context.
    • Downgrade cache read failure to warnings; add warning when retry budget is exhausted.
    • Refactor to compute datasetPath once before retry loop.
  • Triple store (src/modules/triple-store/implementation/ot-blazegraph/ot-blazegraph.js):
    • Wrap queryVoid in try/catch; log HTTP status and response data snippet on failure; rethrow error.

Written by Cursor Bugbot for commit 17016fa. This will update automatically on new commits. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

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);
Copy link

Choose a reason for hiding this comment

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

Bug: Race condition allows duplicate operation completion

The check record?.minAcksReached followed by markOperationAsCompleted and updateMinAcksReached has a race condition. Multiple concurrent responses can each read minAcksReached as false, then all proceed to call markOperationAsCompleted before any of them updates minAcksReached to true. This can cause the same operation to be marked as completed multiple times. The check and update are not atomic and occur outside the operationMutex used by getResponsesStatuses.

Fix in Cursor Fix in Web

@zsculac zsculac merged commit 43d08f2 into v8/develop Dec 12, 2025
3 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants