fix databroker restart versioning, handle missing sessions (#1145)

* fix databroker restart versioning, handle missing sessions

* send empty server version to detect change

* only rebuild if there are updated records
This commit is contained in:
Caleb Doxsey 2020-07-29 08:45:41 -06:00 committed by GitHub
parent a5e8abd6af
commit 557aef2a33
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 53 additions and 62 deletions

View file

@ -178,10 +178,11 @@ func (src *ConfigSource) runUpdater(cfg *config.Config) {
}
onSuccess()
src.onSync(res.GetRecords())
for _, record := range res.GetRecords() {
recordVersion = record.GetVersion()
if len(res.GetRecords()) > 0 {
src.onSync(res.GetRecords())
for _, record := range res.GetRecords() {
recordVersion = record.GetVersion()
}
}
src.mu.Lock()