mirror of
https://github.com/pgsty/minio.git
synced 2026-07-19 04:00:25 +03:00
ListObjects Metadata Caching (#10648)
Design: https://gist.github.com/klauspost/025c09b48ed4a1293c917cecfabdf21c Gist of improvements: * Cross-server caching and listing will use the same data across servers and requests. * Lists can be arbitrarily resumed at a constant speed. * Metadata for all files scanned is stored for streaming retrieval. * The existing bloom filters controlled by the crawler is used for validating caches. * Concurrent requests for the same data (or parts of it) will not spawn additional walkers. * Listing a subdirectory of an existing recursive cache will use the cache. * All listing operations are fully streamable so the number of objects in a bucket no longer dictates the amount of memory. * Listings can be handled by any server within the cluster. * Caches are cleaned up when out of date or superseded by a more recent one.
This commit is contained in:
@@ -59,6 +59,20 @@ type FileInfoVersions struct {
|
||||
Versions []FileInfo
|
||||
}
|
||||
|
||||
// forwardPastVersion will truncate the result to only contain versions after 'v'.
|
||||
// If v is empty or the version isn't found no changes will be made.
|
||||
func (f *FileInfoVersions) forwardPastVersion(v string) {
|
||||
if v == "" {
|
||||
return
|
||||
}
|
||||
for i, ver := range f.Versions {
|
||||
if ver.VersionID == v {
|
||||
f.Versions = f.Versions[i+1:]
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// FileInfo - represents file stat information.
|
||||
type FileInfo struct {
|
||||
// Name of the volume.
|
||||
|
||||
Reference in New Issue
Block a user