[ https://issues.apache.org/jira/browse/TEPHRA-216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15861742#comment-15861742 ]
ASF GitHub Bot commented on TEPHRA-216: --------------------------------------- Github user anew commented on a diff in the pull request: https://github.com/apache/incubator-tephra/pull/34#discussion_r100608042 --- Diff: tephra-hbase-compat-1.1-base/src/main/java/org/apache/tephra/hbase/txprune/DataJanitorState.java --- @@ -366,6 +371,56 @@ public void deleteInactiveTransactionBoundsOnOrBeforeTime(long time) throws IOEx } } + // -------------------------------------------------------- + // ------- Methods for empty regions at a given time ------- + // -------------------------------------------------------- + // Key: 0x4<time><region-id> + // Col 'e': <empty byte array> + // -------------------------------------------------------- + + /** + * Save the given region as empty as of the given time. + * + * @param time time in milliseconds + * @param regionId region id + */ + public void saveEmptyRegionForTime(long time, byte[] regionId) throws IOException { + byte[] timeBytes = Bytes.toBytes(time); + try (Table stateTable = stateTableSupplier.get()) { + Put put = new Put(makeEmptyRegionTimeKey(timeBytes, regionId)); + put.addColumn(FAMILY, EMPTY_REGION_TIME_COL, EMPTY_BYTE_ARRAY); --- End diff -- maybe use a value that is visible to the human eye? Just thinking if you debug and scan the table, a value of "X" is easier to spot than an empty value. > Invalid Transaction List Pruning will not proceed if there are empty > transactional tables > ----------------------------------------------------------------------------------------- > > Key: TEPHRA-216 > URL: https://issues.apache.org/jira/browse/TEPHRA-216 > Project: Tephra > Issue Type: Improvement > Affects Versions: 0.11.0-incubating > Reporter: Gokul Gunasekaran > Assignee: Poorna Chandra > > Since empty table/regions might not undergo major compaction, the prune upper > bound of these regions will never have a value and thus will limit the > progress of invalid list transaction pruning. -- This message was sent by Atlassian JIRA (v6.3.15#6346)