diff --git a/package-lock.json b/package-lock.json index 366f111e8..6f6de7da0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "origintrail_node", - "version": "8.0.0-sigma.13", + "version": "8.0.0-sigma.14", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "origintrail_node", - "version": "8.0.0-sigma.13", + "version": "8.0.0-sigma.14", "license": "ISC", "dependencies": { "@comunica/query-sparql": "^2.4.3", diff --git a/package.json b/package.json index 423cf926e..ce65fce55 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/service/publish-service.js b/src/service/publish-service.js index cfcab86bd..3c8dfe1f6 100644 --- a/src/service/publish-service.js +++ b/src/service/publish-service.js @@ -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); } }