[
https://issues.apache.org/jira/browse/TEPHRA-216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15862044#comment-15862044
]
ASF GitHub Bot commented on TEPHRA-216:
---------------------------------------
Github user poornachandra commented on a diff in the pull request:
https://github.com/apache/incubator-tephra/pull/34#discussion_r100648684
--- 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 --
Sure - will replace empty byte with '1'
> 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: Sub-task
> 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)