File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -1512,11 +1512,12 @@ public synchronized void purgeLogsOlderThan(final long minTxIdToKeep) {
15121512 if (!isOpenForWrite ()) {
15131513 return ;
15141514 }
1515-
1516- assert curSegmentTxId == HdfsServerConstants .INVALID_TXID || // on format this is no-op
1517- minTxIdToKeep <= curSegmentTxId :
1518- "cannot purge logs older than txid " + minTxIdToKeep +
1519- " when current segment starts at " + curSegmentTxId ;
1515+
1516+ Preconditions .checkArgument (
1517+ curSegmentTxId == HdfsServerConstants .INVALID_TXID || // on format this is no-op
1518+ minTxIdToKeep <= curSegmentTxId ,
1519+ "cannot purge logs older than txid " + minTxIdToKeep +
1520+ " when current segment starts at " + curSegmentTxId );
15201521 if (minTxIdToKeep == 0 ) {
15211522 return ;
15221523 }
You can’t perform that action at this time.
0 commit comments