Repository navigation
Make DefaultTabletMap initialize tabletMap later - #505
dkropachev merged 1 commit into
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.
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