lib/db: Add index to track locally needed files (#4958)
To optimize WithNeed, which is called for the local device whenever an index update is received. No tracking for remote devices to conserve db space, as WithNeed is only queried for completion.
This commit is contained in:
@@ -95,6 +95,10 @@ func (f FileInfo) SequenceNo() int64 {
|
||||
return f.Sequence
|
||||
}
|
||||
|
||||
func (f FileInfo) FileVersion() Vector {
|
||||
return f.Version
|
||||
}
|
||||
|
||||
// WinsConflict returns true if "f" is the one to choose when it is in
|
||||
// conflict with "other".
|
||||
func (f FileInfo) WinsConflict(other FileInfo) bool {
|
||||
|
||||
Reference in New Issue
Block a user