aboutsummaryrefslogtreecommitdiff
path: root/weed/filer/arangodb/arangodb_store.go
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2022-09-14 00:07:27 -0700
committerchrislu <chris.lu@gmail.com>2022-09-14 00:07:27 -0700
commit956ce6416fae66646344782cc7f6f557708eb1f4 (patch)
tree816b56483f063eebf9be9c9fe41d7410aba661f3 /weed/filer/arangodb/arangodb_store.go
parent3f4400dc03c3c1476f3edf89d3da31f57bcd4278 (diff)
parent58d18b68d8ca463cef2a817f69f62e7b2fbd61f0 (diff)
downloadseaweedfs-956ce6416fae66646344782cc7f6f557708eb1f4.tar.xz
seaweedfs-956ce6416fae66646344782cc7f6f557708eb1f4.zip
Merge branch 'master' into message_send
Diffstat (limited to 'weed/filer/arangodb/arangodb_store.go')
-rw-r--r--weed/filer/arangodb/arangodb_store.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/weed/filer/arangodb/arangodb_store.go b/weed/filer/arangodb/arangodb_store.go
index 25ef60bf0..ab5f8db4f 100644
--- a/weed/filer/arangodb/arangodb_store.go
+++ b/weed/filer/arangodb/arangodb_store.go
@@ -66,8 +66,8 @@ func (store *ArangodbStore) Initialize(configuration util.Configuration, prefix
}
func (store *ArangodbStore) connection(uris []string, user string, pass string, insecure bool) (err error) {
- ctx, _ := context.WithTimeout(context.Background(), 10*time.Second)
-
+ ctx, cn := context.WithTimeout(context.Background(), 10*time.Second)
+ defer cn()
store.connect, err = http.NewConnection(http.ConnectionConfig{
Endpoints: uris,
TLSConfig: &tls.Config{
@@ -274,10 +274,10 @@ func (store *ArangodbStore) DeleteFolderChildren(ctx context.Context, fullpath u
for d in %s
filter starts_with(d.directory, "%s/") || d.directory == "%s"
remove d._key in %s`,
- targetCollection.Name(),
+ "`"+targetCollection.Name()+"`",
strings.Join(strings.Split(string(fullpath), "/"), ","),
string(fullpath),
- targetCollection.Name(),
+ "`"+targetCollection.Name()+"`",
)
cur, err := store.database.Query(ctx, query, nil)
if err != nil {
@@ -296,7 +296,7 @@ func (store *ArangodbStore) ListDirectoryPrefixedEntries(ctx context.Context, di
if err != nil {
return lastFileName, err
}
- query := "for d in " + targetCollection.Name()
+ query := "for d in " + "`" + targetCollection.Name() + "`"
if includeStartFile {
query = query + " filter d.name >= \"" + startFileName + "\" "
} else {