filer: adjust meta data events to received timestamp

if a client is already connected and start from t0. A message recieved at t+1 but with timestamp t-1 may not be processed by the client.

This commit changes to the event received time, so the replication can be ordered.
This commit is contained in:
Chris Lu 2020-09-15 01:18:33 -07:00
parent 684a875876
commit 10f9081526

View file

@ -108,7 +108,7 @@ func (ma *MetaAggregator) subscribeToOneFiler(f *Filer, self string, peer string
}
dir := event.Directory
// println("received meta change", dir, "size", len(data))
ma.MetaLogBuffer.AddToBuffer([]byte(dir), data, event.TsNs)
ma.MetaLogBuffer.AddToBuffer([]byte(dir), data, 0)
if maybeReplicateMetadataChange != nil {
maybeReplicateMetadataChange(event)
}