filer: path-specific stores trim out common prefixes

This commit is contained in:
Chris Lu
2020-12-21 22:57:13 -08:00
parent 0823bde8d8
commit adf8cb4000
2 changed files with 151 additions and 1 deletions

View File

@@ -41,7 +41,7 @@ func NewFilerStoreWrapper(store FilerStore) *FilerStoreWrapper {
}
func (fsw *FilerStoreWrapper) AddPathSpecificStore(path string, storeId string, store FilerStore) {
fsw.storeIdToStore[storeId] = store
fsw.storeIdToStore[storeId] = NewFilerStorePathTranlator(path, store)
err := fsw.pathToStore.Put([]byte(path), storeId)
if err != nil {
glog.Fatalf("put path specific store: %v", err)