You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by re...@apache.org on 2016/02/17 10:38:19 UTC
svn commit: r1730801 -
/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStore.java
Author: reschke
Date: Wed Feb 17 09:38:19 2016
New Revision: 1730801
URL: http://svn.apache.org/viewvc?rev=1730801&view=rev
Log:
OAK-4022: DocumentNodeStoreService journal write: log write failures
Modified:
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStore.java
Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStore.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStore.java?rev=1730801&r1=1730800&r2=1730801&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStore.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStore.java Wed Feb 17 09:38:19 2016
@@ -2003,9 +2003,13 @@ public final class DocumentNodeStore
return unsavedLastRevisions.persist(this, new UnsavedModifications.Snapshot() {
@Override
public void acquiring(Revision mostRecent) {
- if (store.create(JOURNAL,
- singletonList(changes.asUpdateOp(mostRecent)))) {
+ if (store.create(JOURNAL, singletonList(changes.asUpdateOp(mostRecent)))) {
+ // success: start with a new document
changes = JOURNAL.newDocument(getDocumentStore());
+ } else {
+ // fail: log and keep the changes
+ LOG.error("Failed to write to journal, accumulating changes for future write (~" + changes.getMemory()
+ + " bytes).");
}
}
}, backgroundOperationLock.writeLock());