wenbang commented on a change in pull request #1742:
URL: https://github.com/apache/hbase/pull/1742#discussion_r428091913
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
##########
@@ -8265,14 +8265,22 @@ private WALEdit reckonDeltas(Operation op, Mutation
mutation, Durability effecti
break;
default: throw new UnsupportedOperationException(op.toString());
}
- int newCellSize = PrivateCellUtil.estimatedSerializedSizeOf(newCell);
- if (newCellSize > this.maxCellSize) {
- String msg = "Cell with size " + newCellSize + " exceeds limit of " +
this.maxCellSize
- + " bytes in region " + this;
+ if (this.maxCellSize > 0) {
+ int newCellSize = PrivateCellUtil.estimatedSerializedSizeOf(newCell);
+ if (newCellSize > this.maxCellSize) {
+ String msg = "Cell with size " + newCellSize + " exceeds limit of "
+ this.maxCellSize
+ + " bytes in region " + this;
+ if (LOG.isDebugEnabled()) {
+ LOG.debug(msg);
+ }
+ throw new DoNotRetryIOException(msg);
+ }
+ } else {
+ String msg = "Cell size check is disabled because of maxCellSize is
set to" +
+ this.maxCellSize;
if (LOG.isDebugEnabled()) {
LOG.debug(msg);
Review comment:
ok
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java
##########
@@ -983,6 +983,11 @@ private void checkCellSizeLimit(final HRegion r, final
Mutation m) throws IOExce
throw new DoNotRetryIOException(msg);
}
}
+ } else {
+ String msg = "Cell size check is disabled because of maxCellSize is set
to" + r.maxCellSize;
+ if (LOG.isDebugEnabled()) {
+ LOG.debug(msg);
+ }
Review comment:
ok
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]