cshannon commented on code in PR #4317:
URL: https://github.com/apache/accumulo/pull/4317#discussion_r1509652079
##########
server/base/src/main/java/org/apache/accumulo/server/manager/state/TabletManagementIterator.java:
##########
@@ -69,7 +72,23 @@ public class TabletManagementIterator extends
SkippingIterator {
private TabletBalancer balancer;
private static boolean shouldReturnDueToSplit(final TabletMetadata tm,
- final long splitThreshold) {
+ final Configuration tableConfig) {
+
+ final long splitThreshold = ConfigurationTypeHelper
+
.getFixedMemoryAsBytes(tableConfig.get(Property.TABLE_SPLIT_THRESHOLD.getKey()));
+ final long maxEndRowSize = ConfigurationTypeHelper
+
.getFixedMemoryAsBytes(tableConfig.get(Property.TABLE_MAX_END_ROW_SIZE.getKey()));
+ final int maxFilesToOpen = (int)
ConfigurationTypeHelper.getFixedMemoryAsBytes(
+
tableConfig.get(Property.TSERV_TABLET_SPLIT_FINDMIDPOINT_MAXOPEN.getKey()));
+
+ // If current config/files match unsplittable metadata then we can't split
+ if (Optional
+ .ofNullable(tm.getUnSplittable()).filter(um ->
um.equals(UnSplittableMetadata
+ .toUnSplittable(splitThreshold, maxEndRowSize, maxFilesToOpen,
tm.getFiles())))
+ .isPresent()) {
+ return false;
+ }
+
Review Comment:
I updated to return true if the computed metadata changes in the latest
commit so it will clean up if we can split now due to a change (compaction run
or settings were change, etc) or if we still can't split then the metadata
marker will be updated with the new computed unsplittable metadata
--
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]