Skip to content

Conversation

@dlmarion
Copy link
Contributor

TabletMetadataCache (TMC) caches TabletMetadata for a KeyExtent. TMC loads TabletMetadata via Ample.readTablet with all columns specified and removes TabletMetadata when it has been changed. TMC uses ZooKeeper for signaling TabletMetadata changes. TMC will reduce the load on the metadata and root table where server processes load/unload Tablets frequently for on-demand processing.

@dlmarion dlmarion self-assigned this Feb 22, 2023
@EdColeman
Copy link
Contributor

Did you happen to check how many additional watchers this will add?

@dlmarion
Copy link
Contributor Author

Did you happen to check how many additional watchers this will add?

Did you mean the persistent recursive watch? I'm assuming that it will be one per TabletMetadataCache (where and where it's used). I have not seen anything that says a recursive watch adds a watcher to each child node. I did consider the impact of watches. I was thinking of introducing etcd for this very reason, but I didn't think that it would be well received as it would add an additional runtime dependency. IIRC etcd watches are tied to the client connection, so when the connection is closed, the watches are gone.

@EdColeman
Copy link
Contributor

There are two dimension to my question about the number of watchers.

1 - there is a test with expected number of watchers and the number may need to be adjusted. (and of minor importance)
2 - if there is a watcher added for each extent, then on large systems that could be an incredible load placed on ZooKeeper that needs to be considered.

@dlmarion
Copy link
Contributor Author

if there is a watcher added for each extent, then on large systems that could be an incredible load placed on ZooKeeper that needs to be considered.

Looking at the implementation notes, it appears that there is only one watcher created on the server-side. It says:

PathParentIterator is the "meat" of the implementation. Rather than set watchers on every ZNode implied by a recursive watcher. WatchManager passes any paths it processes through PathParentIterator which iterates up each parent znode looking for watchers.

@dlmarion
Copy link
Contributor Author

dlmarion commented Feb 22, 2023

Automated build that is failing is because it's forcing a zookeeper version of 3.5.10. I think we can remove that for 3.0

@dlmarion dlmarion force-pushed the tablet-metadata-cache branch from 30b835a to b9961e2 Compare March 28, 2023 14:36
@dlmarion dlmarion changed the base branch from main to elasticity March 28, 2023 14:36
@dlmarion
Copy link
Contributor Author

dlmarion commented Jul 3, 2023

Closing in favor of #3563

@dlmarion dlmarion closed this Jul 3, 2023
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