cmd/stdiscosrv: Record time of failed lookup

So that we can eventually garbage collect keys that noone is asking
about any more.
This commit is contained in:
Jakob Borg
2018-03-06 16:15:29 +01:00
parent 22ebc80329
commit 71fab4d250
3 changed files with 48 additions and 15 deletions

View File

@@ -14,10 +14,13 @@ option (gogoproto.goproto_getters_all) = false;
message DatabaseRecord {
repeated DatabaseAddress addresses = 1 [(gogoproto.nullable) = false];
int32 misses = 2; // Number of lookups without hits
int32 misses = 2; // Number of lookups* without hits
int64 seen = 3; // Unix nanos, last device announce
int64 missed = 4; // Unix nanos, last* failed lookup
}
// *) Not every lookup results in a write, so may not be completely accurate
message ReplicationRecord {
string key = 1;
repeated DatabaseAddress addresses = 2 [(gogoproto.nullable) = false];