use of io.dingodb.store.row.errors.IllegalRowStoreOperationException in project dingo by dingodb.
the class KVStoreStateMachine method batchApplyAndRecycle.
private int batchApplyAndRecycle(final byte opByte, final KVStateOutputList kvStates) {
try {
final int size = kvStates.size();
if (size == 0) {
return 0;
}
if (!KVOperation.isValidOp(opByte)) {
throw new IllegalRowStoreOperationException("Unknown operation: " + opByte);
}
// metrics: op qps
final Meter opApplyMeter = KVMetrics.meter(STATE_MACHINE_APPLY_QPS, String.valueOf(this.region.getId()), KVOperation.opName(opByte));
opApplyMeter.mark(size);
this.batchWriteHistogram.update(size);
// do batch apply
batchApply(opByte, kvStates);
return size;
} finally {
RecycleUtil.recycle(kvStates);
}
}
Aggregations