|
|
@ -113,14 +113,14 @@ func (fsw *FilerStoreWrapper) DeleteFolderChildren(ctx context.Context, fp util. |
|
|
|
return fsw.ActualStore.DeleteFolderChildren(ctx, fp) |
|
|
|
} |
|
|
|
|
|
|
|
func (fsw *FilerStoreWrapper) ListDirectoryEntries(ctx context.Context, dirPath util.FullPath, startFileName string, includeStartFile bool, limit int, prefix string) ([]*Entry, error) { |
|
|
|
func (fsw *FilerStoreWrapper) ListDirectoryEntries(ctx context.Context, dirPath util.FullPath, startFileName string, includeStartFile bool, limit int) ([]*Entry, error) { |
|
|
|
stats.FilerStoreCounter.WithLabelValues(fsw.ActualStore.GetName(), "list").Inc() |
|
|
|
start := time.Now() |
|
|
|
defer func() { |
|
|
|
stats.FilerStoreHistogram.WithLabelValues(fsw.ActualStore.GetName(), "list").Observe(time.Since(start).Seconds()) |
|
|
|
}() |
|
|
|
|
|
|
|
entries, err := fsw.ActualStore.ListDirectoryPrefixedEntries(ctx, dirPath, startFileName, includeStartFile, limit, prefix) |
|
|
|
entries, err := fsw.ActualStore.ListDirectoryEntries(ctx, dirPath, startFileName, includeStartFile, limit) |
|
|
|
if err != nil { |
|
|
|
return nil, err |
|
|
|
} |
|
|
@ -130,6 +130,23 @@ func (fsw *FilerStoreWrapper) ListDirectoryEntries(ctx context.Context, dirPath |
|
|
|
return entries, err |
|
|
|
} |
|
|
|
|
|
|
|
func (fsw *FilerStoreWrapper) ListDirectoryPrefixedEntries(ctx context.Context, dirPath util.FullPath, startFileName string, includeStartFile bool, limit int, prefix string) ([]*Entry, error) { |
|
|
|
stats.FilerStoreCounter.WithLabelValues(fsw.ActualStore.GetName(), "list").Inc() |
|
|
|
start := time.Now() |
|
|
|
defer func() { |
|
|
|
stats.FilerStoreHistogram.WithLabelValues(fsw.ActualStore.GetName(), "list").Observe(time.Since(start).Seconds()) |
|
|
|
}() |
|
|
|
|
|
|
|
entries, err := fsw.ActualStore.ListDirectoryPrefixedEntries(ctx, dirPath, startFileName, includeStartFile, limit, prefix) |
|
|
|
if err != nil { |
|
|
|
return nil, err |
|
|
|
} |
|
|
|
for _, entry := range entries { |
|
|
|
filer_pb.AfterEntryDeserialization(entry.Chunks) |
|
|
|
} |
|
|
|
return entries, nil |
|
|
|
} |
|
|
|
|
|
|
|
func (fsw *FilerStoreWrapper) BeginTransaction(ctx context.Context) (context.Context, error) { |
|
|
|
return fsw.ActualStore.BeginTransaction(ctx) |
|
|
|
} |
|
|
|