Author: reschke
Date: Tue Nov 21 15:42:30 2017
New Revision: 1815940
URL: http://svn.apache.org/viewvc?rev=1815940&view=rev
Log:
OAK-5028: Remove DocumentStore.update()
Remove dead code in RDBDocumentStore
Modified:
jackrabbit/oak/trunk/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBDocumentStore.java
Modified:
jackrabbit/oak/trunk/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBDocumentStore.java
URL:
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBDocumentStore.java?rev=1815940&r1=1815939&r2=1815940&view=diff
==============================================================================
---
jackrabbit/oak/trunk/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBDocumentStore.java
(original)
+++
jackrabbit/oak/trunk/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBDocumentStore.java
Tue Nov 21 15:42:30 2017
@@ -812,7 +812,6 @@ public class RDBDocumentStore implements
.unmodifiableSet(new HashSet<String>(Arrays.asList(new String[] {
"version" })));
// set of properties not serialized to JSON
- // when adding new columns also update UNHANDLEDPROPS!
private static final Set<String> COLUMNPROPERTIES = new
HashSet<String>(Arrays.asList(
new String[] { ID, NodeDocument.HAS_BINARY_FLAG,
NodeDocument.DELETED_ONCE, COLLISIONSMODCOUNT, MODIFIED, MODCOUNT }));
@@ -1770,7 +1769,7 @@ public class RDBDocumentStore implements
boolean shouldRetry = true;
// every 16th update is a full rewrite
- if (isAppendableUpdate(update, false) && modcount % 16 != 0) {
+ if (isAppendableUpdate(update) && modcount % 16 != 0) {
String appendData = ser.asString(update);
if (appendData.length() < tmd.getDataLimitInOctets() /
CHAR2OCTETRATIO) {
try {
@@ -1826,23 +1825,8 @@ public class RDBDocumentStore implements
}
}
- // set of properties not serialized and not handled specifically by update
code
- private static final Set<Key> UNHANDLEDPROPS = new HashSet<Key>(
- Arrays.asList(new Key[] { new Key(NodeDocument.HAS_BINARY_FLAG,
null), new Key(NodeDocument.DELETED_ONCE, null) }));
-
- private static boolean isAppendableUpdate(UpdateOp update, boolean
batched) {
- if (NOAPPEND) {
- return false;
- }
- if (batched) {
- // Detect update operations not supported when doing batch updates
- for (Key key : update.getChanges().keySet()) {
- if (UNHANDLEDPROPS.contains(key)) {
- return false;
- }
- }
- }
- return true;
+ private static boolean isAppendableUpdate(UpdateOp update) {
+ return NOAPPEND == false;
}
private static long getModifiedFromOperation(Operation op) {