Skip to content

Moves reading root tablet metadata w/ zoocache out of Ample#4673

Merged
keith-turner merged 1 commit intoapache:elasticityfrom
keith-turner:root_tablet_loc_cleanup_2
Jun 14, 2024
Merged

Moves reading root tablet metadata w/ zoocache out of Ample#4673
keith-turner merged 1 commit intoapache:elasticityfrom
keith-turner:root_tablet_loc_cleanup_2

Conversation

@keith-turner
Copy link
Contributor

After the changes in #4669 only a single location in the code was reading tablet metadata w/ eventual consistency using Ample. This single location was the root tablet location cache. Since this was the only use of the code and its a highly nuanced use case, moved the code out of Ample to the only place that was using it. Removing the levels of indirection makes it easier to understand the root tablet location cache. Also added some comments about what the the root tablet location cache is doing and noticed and uneeded cache clear it was doing and removed it.

After the changes in apache#4669 only a single location in the code was
reading tablet metadata w/ eventual consistency using Ample.  This
single location was the root tablet location cache.  Since this
was the only use of the code and its a highly nuanced use case,
moved the code out of Ample to the only place that was using it.
Removing the levels of indirection makes it easier to understand
the root tablet location cache. Also added some comments about
what the the root tablet location cache is doing and noticed and
uneeded cache clear it was doing and removed it.
@Override
public void invalidateCache(ClientContext context, String server) {
ZooCache zooCache = context.getZooCache();
String root = context.getZooKeeperRoot() + Constants.ZTSERVERS;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This seems like a bug. Its clearing something that has nothing to do w/ the root tablet metadata stored in zookeeper. So removed it. It probably not really hurting anything. Thought about back porting a change to remove these lines in earlier versions.

Copy link
Contributor

@dlmarion dlmarion left a comment

Choose a reason for hiding this comment

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

Looks good

@keith-turner keith-turner merged commit 063d120 into apache:elasticity Jun 14, 2024
@keith-turner keith-turner deleted the root_tablet_loc_cleanup_2 branch June 14, 2024 20:27
@keith-turner keith-turner added this to the 4.0.0 milestone Jul 12, 2024
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.

2 participants