From 885f1d1e5e7097794e2fe76198f6ffd9eddbd656 Mon Sep 17 00:00:00 2001 From: John Fortin Date: Mon, 21 Oct 2019 19:57:30 -0400 Subject: [PATCH] NIFI-6795 - fix for CouchbaseMapCacheClient to allow new objects to be created Signed-off-by: John Fortin Signed-off-by: Pierre Villard This closes #3833. --- .../java/org/apache/nifi/couchbase/CouchbaseMapCacheClient.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nifi-nar-bundles/nifi-couchbase-bundle/nifi-couchbase-processors/src/main/java/org/apache/nifi/couchbase/CouchbaseMapCacheClient.java b/nifi-nar-bundles/nifi-couchbase-bundle/nifi-couchbase-processors/src/main/java/org/apache/nifi/couchbase/CouchbaseMapCacheClient.java index 703f4e5857..f2b7cd7c20 100644 --- a/nifi-nar-bundles/nifi-couchbase-bundle/nifi-couchbase-processors/src/main/java/org/apache/nifi/couchbase/CouchbaseMapCacheClient.java +++ b/nifi-nar-bundles/nifi-couchbase-bundle/nifi-couchbase-processors/src/main/java/org/apache/nifi/couchbase/CouchbaseMapCacheClient.java @@ -145,7 +145,7 @@ public class CouchbaseMapCacheClient extends AbstractControllerService implement @Override public boolean replace(AtomicCacheEntry entry, Serializer keySerializer, Serializer valueSerializer) throws IOException { - final Long revision = entry.getRevision().orElse(0L); + final Long revision = entry.getRevision().orElse(-1L); final String docId = toDocumentId(entry.getKey(), keySerializer); final Document doc = toDocument(docId, entry.getValue(), valueSerializer, revision); try {