diff options
author | Jo Kristian Bergum <bergum@yahoo-inc.com> | 2017-12-19 13:02:26 +0100 |
---|---|---|
committer | Jo Kristian Bergum <bergum@yahoo-inc.com> | 2017-12-19 13:02:26 +0100 |
commit | 64b6b155d36d7f0266ea6824934623a26eea5b8f (patch) | |
tree | d683e83729789130a68683529bfaf50f8a8769c6 /vespa-http-client | |
parent | 95b2ce61a3f20cacf310066339c67d6e51dac0b7 (diff) |
Fix ordering issue when there are more then one pending operation for a document
Diffstat (limited to 'vespa-http-client')
-rw-r--r-- | vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/operationProcessor/OperationProcessor.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/operationProcessor/OperationProcessor.java b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/operationProcessor/OperationProcessor.java index 0a9fe72552c..5907694f55a 100644 --- a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/operationProcessor/OperationProcessor.java +++ b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/operationProcessor/OperationProcessor.java @@ -177,10 +177,14 @@ public class OperationProcessor { docSendInfoByOperationId.remove(endpointResult.getOperationId()); String documentId = documentSendInfo.getDocument().getDocumentId(); - inflightDocumentIds.remove(documentId); - + /** + * If we got a pending operation against this document + * dont't remove it from inflightDocuments and send blocked document operation + */ List<Document> blockedDocuments = blockedDocumentsByDocumentId.get(documentId); - if (! blockedDocuments.isEmpty()) { + if (blockedDocuments.isEmpty()) { + inflightDocumentIds.remove(documentId); + } else { sendToClusters(blockedDocuments.remove(0)); } return result; |