[GitHub] [hbase] Joseph295 commented on a change in pull request #2568: HBASE-25205 Corrupted hfiles append timestamp every time the region i…

2020-10-26 Thread GitBox


Joseph295 commented on a change in pull request #2568:
URL: https://github.com/apache/hbase/pull/2568#discussion_r512373857



##
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
##
@@ -5301,7 +5301,11 @@ private long replayRecoveredEditsForPaths(long 
minSeqIdForTheRegion, FileSystem
 
   long maxSeqId;
   String fileName = edits.getName();
-  maxSeqId = Math.abs(Long.parseLong(fileName));
+  if (isSkipErrorEnabled() && 
fileName.endsWith(HConstants.HREGION_EDITS_CORRUPTED_SUFFIX)) {

Review comment:
   > recovered.edits have same problem? or problem only for 
SplitWALToHFile? Can we have UT for this?
   
   I checked the code, recovered.edits will be cleared at the beginning, so we 
don't need UT now?





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:
us...@infra.apache.org




[GitHub] [hbase] Joseph295 commented on a change in pull request #2568: HBASE-25205 Corrupted hfiles append timestamp every time the region i…

2020-10-26 Thread GitBox


Joseph295 commented on a change in pull request #2568:
URL: https://github.com/apache/hbase/pull/2568#discussion_r512373857



##
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
##
@@ -5301,7 +5301,11 @@ private long replayRecoveredEditsForPaths(long 
minSeqIdForTheRegion, FileSystem
 
   long maxSeqId;
   String fileName = edits.getName();
-  maxSeqId = Math.abs(Long.parseLong(fileName));
+  if (isSkipErrorEnabled() && 
fileName.endsWith(HConstants.HREGION_EDITS_CORRUPTED_SUFFIX)) {

Review comment:
   > recovered.edits have same problem? or problem only for 
SplitWALToHFile? Can we have UT for this?
   
   I checked the code, recovered.edits will clear the files at the beginning, 
so we don't need UT now?





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:
us...@infra.apache.org




[GitHub] [hbase] Joseph295 commented on a change in pull request #2568: HBASE-25205 Corrupted hfiles append timestamp every time the region i…

2020-10-26 Thread GitBox


Joseph295 commented on a change in pull request #2568:
URL: https://github.com/apache/hbase/pull/2568#discussion_r512373549



##
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
##
@@ -5324,22 +5328,25 @@ private long replayRecoveredEditsForPaths(long 
minSeqIdForTheRegion, FileSystem
   }
 
   private void handleException(FileSystem fs, Path edits, IOException e) 
throws IOException {
-boolean skipErrors = 
conf.getBoolean(HConstants.HREGION_EDITS_REPLAY_SKIP_ERRORS,
-  conf.getBoolean("hbase.skip.errors", 
HConstants.DEFAULT_HREGION_EDITS_REPLAY_SKIP_ERRORS));
-if (conf.get("hbase.skip.errors") != null) {
-  LOG.warn("The property 'hbase.skip.errors' has been deprecated. Please 
use "
-  + HConstants.HREGION_EDITS_REPLAY_SKIP_ERRORS + " instead.");
-}
-if (skipErrors) {
+if (isSkipErrorEnabled()) {

Review comment:
   Sorry sir, I don't catch you. You mean set skip error config to true?





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:
us...@infra.apache.org




[GitHub] [hbase] Joseph295 commented on a change in pull request #2568: HBASE-25205 Corrupted hfiles append timestamp every time the region i…

2020-10-21 Thread GitBox


Joseph295 commented on a change in pull request #2568:
URL: https://github.com/apache/hbase/pull/2568#discussion_r509847080



##
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
##
@@ -5301,7 +5301,11 @@ private long replayRecoveredEditsForPaths(long 
minSeqIdForTheRegion, FileSystem
 
   long maxSeqId;
   String fileName = edits.getName();
-  maxSeqId = Math.abs(Long.parseLong(fileName));
+  if (isSkipErrorEnabled() && 
fileName.endsWith(HConstants.HREGION_EDITS_CORRUPTED_SUFFIX)) {

Review comment:
   OK, let me add a UT for that.





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:
us...@infra.apache.org




[GitHub] [hbase] Joseph295 commented on a change in pull request #2568: HBASE-25205 Corrupted hfiles append timestamp every time the region i…

2020-10-21 Thread GitBox


Joseph295 commented on a change in pull request #2568:
URL: https://github.com/apache/hbase/pull/2568#discussion_r509842639



##
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
##
@@ -5324,22 +5328,25 @@ private long replayRecoveredEditsForPaths(long 
minSeqIdForTheRegion, FileSystem
   }
 
   private void handleException(FileSystem fs, Path edits, IOException e) 
throws IOException {
-boolean skipErrors = 
conf.getBoolean(HConstants.HREGION_EDITS_REPLAY_SKIP_ERRORS,
-  conf.getBoolean("hbase.skip.errors", 
HConstants.DEFAULT_HREGION_EDITS_REPLAY_SKIP_ERRORS));
-if (conf.get("hbase.skip.errors") != null) {
-  LOG.warn("The property 'hbase.skip.errors' has been deprecated. Please 
use "
-  + HConstants.HREGION_EDITS_REPLAY_SKIP_ERRORS + " instead.");
-}
-if (skipErrors) {
+if (isSkipErrorEnabled()) {
   Path p = WALSplitUtil.moveAsideBadEditsFile(fs, edits);
-  LOG.error(HConstants.HREGION_EDITS_REPLAY_SKIP_ERRORS + "=true so 
continuing. Renamed "
-  + edits + " as " + p,
-e);
+  LOG.info(

Review comment:
   This is a behavior as expected?





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:
us...@infra.apache.org