|
@ -113,14 +113,14 @@ func (fsw *FilerStoreWrapper) DeleteFolderChildren(ctx context.Context, fp util. |
|
|
return fsw.ActualStore.DeleteFolderChildren(ctx, fp) |
|
|
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() |
|
|
stats.FilerStoreCounter.WithLabelValues(fsw.ActualStore.GetName(), "list").Inc() |
|
|
start := time.Now() |
|
|
start := time.Now() |
|
|
defer func() { |
|
|
defer func() { |
|
|
stats.FilerStoreHistogram.WithLabelValues(fsw.ActualStore.GetName(), "list").Observe(time.Since(start).Seconds()) |
|
|
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 { |
|
|
if err != nil { |
|
|
return nil, err |
|
|
return nil, err |
|
|
} |
|
|
} |
|
@ -130,6 +130,23 @@ func (fsw *FilerStoreWrapper) ListDirectoryEntries(ctx context.Context, dirPath |
|
|
return entries, err |
|
|
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) { |
|
|
func (fsw *FilerStoreWrapper) BeginTransaction(ctx context.Context) (context.Context, error) { |
|
|
return fsw.ActualStore.BeginTransaction(ctx) |
|
|
return fsw.ActualStore.BeginTransaction(ctx) |
|
|
} |
|
|
} |
|
|