-
Notifications
You must be signed in to change notification settings - Fork 95
Conversation
Changes Unknown when pulling 09eaa44 on retention-kafka into ** on master**. |
Changes Unknown when pulling 87421fa on retention-kafka into ** on master**. |
Changes Unknown when pulling 96cc077 on retention-kafka into ** on master**. |
Changes Unknown when pulling f46ed74 on retention-kafka into ** on master**. |
Changes Unknown when pulling f46ed74 on retention-kafka into ** on master**. |
Changes Unknown when pulling f47914d on retention-kafka into ** on master**. |
Changes Unknown when pulling de3ee03 on retention-kafka into ** on master**. |
// input/store operations and jump directly to sealing extent in metadata | ||
if common.IsKafkaPhantomInput(event.inputID) && | ||
common.AreKafkaPhantomStores(event.storeIDs) { | ||
event.state = updateMetadataState |
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.
log this lifecyle event for kafka extent.
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.
also add a comment explaining when is an extentDownEvent expected for a kafka extent.
|
||
for _, replicaStat := range extStats.GetReplicaStats() { | ||
extInfo.storehosts = append(extInfo.storehosts, storehostID(replicaStat.GetStoreUUID())) | ||
storehosts = append(storehosts, storehostID(replicaStat.GetStoreUUID())) |
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.
what's the difference between the storehosts/storeUUIDs ? They both store the same set (except for the typecast)
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.
storeUUIDs is '[]string', while storehosts is '[]storeUUID'. i have defined separate types for store/extent/dest UUIDs -- and those are used within the main code (retention.go); it helps avoiding inadvertent mistakes like passing in one UUID for another, etc (basically, get in the advantages of being strongly typed).
|
||
extInfo := &extentInfo{ | ||
id: extentID(extent.GetExtentUUID()), | ||
status: extStats.GetStatus(), | ||
statusUpdatedTime: time.Unix(0, extStats.GetStatusUpdatedTimeMillis()*int64(time.Millisecond)), | ||
storehosts: make([]storehostID, 0, len(storeUUIDs)), | ||
storehosts: storehosts, |
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.
can you just typecast like []string(storeUUIDs) instead of copying the whole set ?
this is one of the reasons I hate typedefs :(
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.
You cannot typecast slices (container types, in general) with differing containing types -- afaik, the only way to convert is to do the copy. Yes, I know it sucks. :-)
log.WithFields(bark.Fields{ | ||
common.TagCnsmID: cgInfo.id, | ||
common.TagErr: err, | ||
}).Error(`computeRetention: minAckAddr GetAckLevel failed`) |
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.
also print isKafkaPhantomExtent
((allHaveConsumed && softRetentionConsumed) || hardRetentionConsumed) { | ||
((allHaveConsumed && softRetentionConsumed) || | ||
hardRetentionConsumed || | ||
ext.kafkaPhantomExtent) { | ||
|
||
log.WithFields(bark.Fields{ |
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.
print isKafkaPhantomExtent
Ship it after addressing comments |
Changes Unknown when pulling 9bd1e87 on retention-kafka into ** on master**. |
No description provided.