final PhoenixConnection connection = new PhoenixConnection(this.connection);
MutationState state = mutate(context, iterator, connection);
long totalRowCount = state.getUpdateCount();
if (connection.getAutoCommit()) {
connection.getMutationState().join(state);
connection.commit();
ConnectionQueryServices services = connection.getQueryServices();
int maxSize = services.getProps().getInt(QueryServices.MAX_MUTATION_SIZE_ATTRIB,QueryServicesOptions.DEFAULT_MAX_MUTATION_SIZE);
state = new MutationState(maxSize, connection, totalRowCount);
}
final MutationState finalState = state;