Batch operation by priority for offline folders

pull/172/head
M66B 5 years ago
parent 7183255de8
commit 275ebf751d

@ -48,6 +48,12 @@ public class TupleOperationEx extends EntityOperation {
PartitionKey getPartitionKey(boolean offline) { PartitionKey getPartitionKey(boolean offline) {
PartitionKey key = new PartitionKey(); PartitionKey key = new PartitionKey();
if (offline) {
// open/close folder is expensive
key.priority = this.priority + 10;
return key;
}
if (FETCH.equals(name)) if (FETCH.equals(name))
try { try {
JSONArray jargs = new JSONArray(args); JSONArray jargs = new JSONArray(args);
@ -62,9 +68,6 @@ public class TupleOperationEx extends EntityOperation {
key.priority = this.priority; key.priority = this.priority;
key.operation = this.name; key.operation = this.name;
if (offline)
key.priority += 10;
return key; return key;
} }

Loading…
Cancel
Save