unified-storage: Skip query when ListModifiedSince cannot return anything. (#110338)
* Skip query when ListModifiedSince cannot return anything. * Only save listRV if it's different than sinceRV. This saves a disk access if not needed. * Add test for ListModifiedSince with same RV.
This commit is contained in:
@@ -1273,7 +1273,7 @@ func (b *bleveIndex) updateIndexWithLatestModifications(ctx context.Context, req
|
||||
|
||||
startTime := time.Now()
|
||||
listRV, docs, err := b.updaterFn(ctx, b, sinceRV)
|
||||
if err == nil && listRV > 0 {
|
||||
if err == nil && listRV > 0 && listRV != sinceRV {
|
||||
err = b.updateResourceVersion(listRV) // updates b.resourceVersion
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user