-
Notifications
You must be signed in to change notification settings - Fork 39
Make DefaultTabletMap initialize tabletMap later #505
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make DefaultTabletMap initialize tabletMap later #505
Conversation
93570fa to
ed0eab6
Compare
Currently `tabletMap` is initialized once at `DefaultMetadata.EMPTY` As result all the session instances have same `tabletMap`, which can lead to all sort of problems. This commit postpone tabletMap initialization and changes Metadata API to reflect these changes.
ed0eab6 to
614f288
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While this probably works would it not be better to eventually decouple TabletMap from TokenMap and have it work fully separately? Binding tablet map initialization to token map will require in the future that token map is always running too.
Alternatively this can be fixed with just changing
public static DefaultMetadata EMPTY =
new DefaultMetadata(
Collections.emptyMap(), Collections.emptyMap(), null, null, DefaultTabletMap.emptyMap());
into
public static DefaultMetadata empty() {
return new DefaultMetadata(
Collections.emptyMap(), Collections.emptyMap(), null, null, DefaultTabletMap.emptyMap());
}
|
Ah, its not part of |
They are currently couple via Partitioner, which will be addressed at #502 |
|
All test failures not related to the PR. |
Currently
tabletMapis initialized once atDefaultMetadata.EMPTYAs result all the session instances have sametabletMap, which can lead to all sort of problems.This commit postpone
tabletMapinitialization and changes Metadata API to reflect these changes.Partially addresses: #504