frostruan commented on code in PR #5692:
URL: https://github.com/apache/hbase/pull/5692#discussion_r1765327947
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java:
##########
@@ -2522,6 +2522,20 @@ public FlushResultImpl flushcache(List<byte[]> families,
boolean writeFlushReque
LOG.debug(msg);
return new FlushResultImpl(FlushResult.Result.CANNOT_FLUSH, msg, false);
}
+ // cannot flush non-existing column families, and fail-fast
+ if (families != null) {
+ List<String> noSuchFamilies =
+ families.stream().filter(cf ->
!getTableDescriptor().hasColumnFamily(cf))
+ .map(cf -> Bytes.toString(cf)).collect(Collectors.toList());
+ if (noSuchFamilies.size() > 0) {
+ String noSuchFamiliesMsg = String.format(
+ "There are non-existing families %s, we cannot flush the region %s,
in table %s.",
+ noSuchFamilies, getRegionInfo().getRegionNameAsString(),
+ getTableDescriptor().getTableName().getNameAsString());
+ LOG.warn(noSuchFamiliesMsg);
Review Comment:
I also think the log here is unnecessary too. If you want to log this to
trace bad requests, RegionServer will log some key information for
FlushRegionRequest and ExecuteProceduresRequest. Is it possible to merge the
information here into that log?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]