read filer signature

This commit is contained in:
Chris Lu
2020-09-05 22:52:15 -07:00
parent 71b0e256c7
commit bba90ff3c8
5 changed files with 168 additions and 145 deletions

View File

@@ -47,6 +47,16 @@ func (ma *MetaAggregator) StartLoopSubscribe(f *Filer, self string) {
func (ma *MetaAggregator) subscribeToOneFiler(f *Filer, self string, filer string) {
/*
Each filer reads the "filer.store.id", which is the store's signature when filer starts.
When reading from other filers' local meta changes:
* if the received change does not contain signature from self, apply the change to current filer store.
Upon connecting to other filers, need to remember their signature and their offsets.
*/
var maybeReplicateMetadataChange func(*filer_pb.SubscribeMetadataResponse)
lastPersistTime := time.Now()
changesSinceLastPersist := 0