Github user mjwall commented on a diff in the pull request:
https://github.com/apache/accumulo/pull/82#discussion_r57588655
--- Diff:
server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java ---
@@ -519,36 +520,25 @@ protected void finalize() throws Throwable {
}
}
- private void _mutate(Mutation mutation, int mutationCount) {
+ private int _mutate(Mutation mutation, int mutationCount) {
List<ColumnUpdate> updates = mutation.getUpdates();
if (updates.size() == 1) {
ColumnUpdate update = updates.get(0);
singleUpdate(nmPointer, mutation.getRow(), update.getColumnFamily(),
update.getColumnQualifier(), update.getColumnVisibility(),
update.getTimestamp(),
- update.isDeleted(), update.getValue(), mutationCount);
+ update.isDeleted(), update.getValue(), mutationCount++);
} else if (updates.size() > 1) {
long uid = startUpdate(nmPointer, mutation.getRow());
for (ColumnUpdate update : updates) {
update(nmPointer, uid, update.getColumnFamily(),
update.getColumnQualifier(), update.getColumnVisibility(),
update.getTimestamp(), update.isDeleted(),
- update.getValue(), mutationCount);
+ update.getValue(), mutationCount++);
}
-
}
+ return mutationCount;
}
public void mutate(Mutation mutation, int mutationCount) {
- wlock.lock();
--- End diff --
I made mutate(Mutation, int) simple wrap the mutation in a
Collections.singletonList and call the mutate(List<Mutation>, int) method.
They were slightly different code paths before. There is a lock in the
mutate(List,int) method, so it was not needing the mutate(Mutation,int) method
any longer.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---