fix(listing): resolve undecidable list entries against the locked read path

Refs: https://github.com/pgsty/silo/issues/218

Signed-off-by: mr javad seydi <seydi.birjand@gmail.com>
This commit is contained in:
mr javad seydi
2026-09-19 22:11:10 +03:30
parent 2fde3cf535
commit 258b167b1c
9 changed files with 272 additions and 18 deletions
+10
View File
@@ -461,6 +461,16 @@ func (m metaCacheEntries) firstFound() (first *metaCacheEntry, n int) {
return first, n
}
// firstObject returns the first entry that contains object metadata.
func (m metaCacheEntries) firstObject() *metaCacheEntry {
for i := range m {
if m[i].isObject() {
return &m[i]
}
}
return nil
}
// names will return all names in order.
// Since this allocates it should not be used in critical functions.
func (m metaCacheEntries) names() []string {