aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelee <eddy@gfxlabs.io>2022-03-18 00:26:11 -0500
committerelee <eddy@gfxlabs.io>2022-03-18 00:26:11 -0500
commit0701feeb1791abefaad47e585170950922cf792d (patch)
tree1d5f909c9a68cc60b4ee35bf12004ced91a91d24
parent171c27ddf1a3889304ae36892a53c43076b5a4cb (diff)
downloadseaweedfs-0701feeb1791abefaad47e585170950922cf792d.tar.xz
seaweedfs-0701feeb1791abefaad47e585170950922cf792d.zip
added more to readme
-rw-r--r--weed/filer/arangodb/arangodb_store.go6
-rw-r--r--weed/filer/arangodb/readme.md7
2 files changed, 9 insertions, 4 deletions
diff --git a/weed/filer/arangodb/arangodb_store.go b/weed/filer/arangodb/arangodb_store.go
index a39735108..c1445f026 100644
--- a/weed/filer/arangodb/arangodb_store.go
+++ b/weed/filer/arangodb/arangodb_store.go
@@ -109,11 +109,11 @@ func (store *ArangodbStore) connection(uris []string, user string, pass string,
}); err != nil {
return err
}
-
if _, _, err = store.collection.EnsurePersistentIndex(ctx, []string{"directory"},
&driver.EnsurePersistentIndexOptions{Name: "IDX_directory"}); err != nil {
return err
}
+
if _, _, err = store.collection.EnsureTTLIndex(ctx, "ttl", 1,
&driver.EnsureTTLIndexOptions{Name: "IDX_TTL"}); err != nil {
return err
@@ -291,8 +291,8 @@ func (store *ArangodbStore) DeleteEntry(ctx context.Context, fullpath util.FullP
}
func (store *ArangodbStore) DeleteFolderChildren(ctx context.Context, fullpath util.FullPath) error {
- query := ""
- query = fmt.Sprintf(`for d in files filter starts_with(d.directory, "%s") remove d._key in files`,
+ var query string
+ query = query + fmt.Sprintf(`filter starts_with(d.directory, "%s") remove d._key in files`,
strings.Join(strings.Split(string(fullpath), "/"), ","),
string(fullpath),
)
diff --git a/weed/filer/arangodb/readme.md b/weed/filer/arangodb/readme.md
index eb6411c2e..eaa8bd7a7 100644
--- a/weed/filer/arangodb/readme.md
+++ b/weed/filer/arangodb/readme.md
@@ -44,4 +44,9 @@ should there be one collection per bucket? would make deleting a bucket instant
arangodb uses rocksdb in the background, so i am assuming things run in log time
i am not sure how the prefix query scales compared to the recursive calls that some other stores do for folder deletion
-might need to change that
+might need to change that.
+
+
+ok, so if https://www.arangodb.com/docs/stable/indexing-index-basics.html#persistent-index is correct
+it should be log time to the number of files in the directory
+and constant time if you have full directory + file