Persist currently started allocation IDs to index metadata#14964
Persist currently started allocation IDs to index metadata#14964ywelsch merged 2 commits intoelastic:masterfrom
Conversation
94441d3 to
7d2b2ed
Compare
There was a problem hiding this comment.
I think we should make this unmodifiable here at least?
|
left minor comments LGTM otherwise |
There was a problem hiding this comment.
can we call these "activeAllocationIds" ?
There was a problem hiding this comment.
also we need those PER shard.. so the allocation ids for shard 0, alloc ids for shard 1 etc.
|
This looks good. I left some minor suggestion. Note the comment about storing allocation ids per shard in the meta data. I know the allocation Ids are unique so in theory we can throw them in one big pile, but I think it will be clearer in terms of code and API later on to have them separated. |
There was a problem hiding this comment.
I wonder if we should follow the OpenIntMap and call this StringMapDiff , just to key things shorter.
|
Nice one @ywelsch . Left some minor comments. |
|
@bleskes Another set of changes:
|
There was a problem hiding this comment.
DiffablePrototypeValueReader -> DiffablePrototypeValue_Serializer_ for consistency
There was a problem hiding this comment.
The prototype is only used for the "reading" part, hence the name.
There was a problem hiding this comment.
yeah, got it- just found it confusing.
|
pushed minor changes to address @bleskes's suggestions
|
There was a problem hiding this comment.
can we have some javadocs what that is?
|
I will look again this afternoon... sorry for the delay |
There was a problem hiding this comment.
I think write and read would be enough as method names? the Diff & To part is implicit from the args?
There was a problem hiding this comment.
Makes sense to throw the To and From part away. I want to keep writeDiff and readDiff though. For readDiff, it's necessary as it has the same method signature as read (except return type). To keep things symmetric for write and make it more verbose in the code of the MapDiff implementation, I'll use writeDiff.
|
i left some cosmetic comments LGTM in general |
7aab1a5 to
601a119
Compare
|
LGTM |
- Supports ImmutableOpenIntMap besides java.util.Map and ImmutableOpenMap - Map keys can be any value (not only String) - Map values do not have to implement Diffable interface. In that case custom value serializer needs to be provided.
601a119 to
fef043a
Compare
…etadata Persist currently started allocation IDs to index metadata
These allocation IDs serve as candidates to decide future primary shards
Subtask of #14739