Skip to content

Commit

Permalink
Merge pull request #3593 from OriginTrail/publish-scheduling-fix
Browse files Browse the repository at this point in the history
Publish scheduling fix
  • Loading branch information
brkagithub authored Dec 24, 2024
2 parents c80fb36 + 71e6ffc commit 7967d08
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "origintrail_node",
"version": "8.0.0-sigma.13",
"version": "8.0.0-sigma.14",
"description": "OTNode V8",
"main": "index.js",
"type": "module",
Expand Down
6 changes: 5 additions & 1 deletion src/service/publish-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,11 @@ class PublishService extends OperationService {
// Not all requests sent, still possible to reach minimum replication,
// schedule requests for leftover nodes
const potentialCompletedNumber = completedNumber + leftoverNodes.length;
if (leftoverNodes.length > 0 && potentialCompletedNumber >= minAckResponses) {
if (
leftoverNodes.length > 0 &&
potentialCompletedNumber >= minAckResponses &&
(totalResponses - 1) % batchSize === 0
) {
await this.scheduleOperationForLeftoverNodes(command.data, leftoverNodes);
}
}
Expand Down

0 comments on commit 7967d08

Please sign in to comment.