Skip to content

TODO Cleanup - #6509

Draft
Amemeda wants to merge 4 commits into
apache:mainfrom
Amemeda:remove-todos
Draft

TODO Cleanup#6509
Amemeda wants to merge 4 commits into
apache:mainfrom
Amemeda:remove-todos

Conversation

@Amemeda

@Amemeda Amemeda commented Aug 20, 2026

Copy link
Copy Markdown
Contributor
  • Redact keyExtents in outstanding migrations output to remove TODO in ThrottledBalancerProblemReporter.java. Added this logic onto existing .stream in the logger that logs 10 outstanding migrations.

  • Removed outdated TODO from ClientContext.java.


Removes 2 TODOs from #2699

@Amemeda Amemeda changed the title Obscure keyExtents in outstanding migrations output to remove TODO TODO Cleanup Aug 20, 2026
Comment on lines +80 to +91
/*
* TODO ACCUMULO-2938 redact key extents in this output to avoid leaking protected
* information.
*/

// convert each tabletId in migrations to keyExtent
Set<KeyExtent> keyExtents = migrations.stream().map(tabletId -> {
KeyExtent extent = KeyExtent.fromTabletId(tabletId);
extent.obscured();
return extent;
}).collect(Collectors.toSet());

if (log.isDebugEnabled()) {
log.debug("Sample up to 10 outstanding migrations: {}",
migrations.stream().limit(10).map(String::valueOf).collect(Collectors.joining(", ")));
keyExtents.stream().limit(10).map(String::valueOf).collect(Collectors.joining(", ")));

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding these comments from the ASF accumulo channel

Image

Comment on lines +84 to +88
String.join(", ", migrations.stream().limit(10).map(tabletId -> {
KeyExtent extent = KeyExtent.fromTabletId(tabletId);
extent.obscured();
return extent.toString();
}).map(String::valueOf).collect(Collectors.toSet())));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
String.join(", ", migrations.stream().limit(10).map(tabletId -> {
KeyExtent extent = KeyExtent.fromTabletId(tabletId);
extent.obscured();
return extent.toString();
}).map(String::valueOf).collect(Collectors.toSet())));
migrations.stream()
.limit(10)
.map(tabletId -> {
KeyExtent extent = KeyExtent.fromTabletId(tabletId);
extent.obscured();
return extent.toString();
})
.collect(Collectors.joining(", "));

I think you can do the join right off the stream so we dont need to collect to a new set. I didnt test this code so the working code might be different

@Amemeda

Amemeda commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author
if (retryCountDownTimer.isExpired()) {
          // TODO exception used for timeout is inconsistent
          throw new TimedOutException(
              "Failed to find servers to process scans before timeout was exceeded.");
        }

Does anyone know why this exception from TabletServerBatchReaderIterator.java is inconsistent? Is the message inconsistent with what is actually happening?

Comment on lines +85 to +87
KeyExtent extent = KeyExtent.fromTabletId(tabletId);
extent.obscured();
return extent.toString();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

obscured returns the obfuscated String.

Suggested change
KeyExtent extent = KeyExtent.fromTabletId(tabletId);
extent.obscured();
return extent.toString();
return KeyExtent.fromTabletId(tabletId).obscured();

@dlmarion

Copy link
Copy Markdown
Contributor

Does anyone know why this exception from TabletServerBatchReaderIterator.java is inconsistent? Is the message inconsistent with what is actually happening?

No idea

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants