aboutsummaryrefslogtreecommitdiff
path: root/weed/filer/ydb/ydb_store.go
diff options
context:
space:
mode:
authorChris Lu <chrislusf@users.noreply.github.com>2025-07-16 23:39:27 -0700
committerGitHub <noreply@github.com>2025-07-16 23:39:27 -0700
commit69553e5ba6d46ed924b0c3adc3f8d9666550999a (patch)
tree7711c4d9fe1919d2c6eaa841779bcde6e24b0248 /weed/filer/ydb/ydb_store.go
parenta524b4f485ce5aa2f234c742bd7d1e75386f569b (diff)
downloadseaweedfs-69553e5ba6d46ed924b0c3adc3f8d9666550999a.tar.xz
seaweedfs-69553e5ba6d46ed924b0c3adc3f8d9666550999a.zip
convert error fromating to %w everywhere (#6995)
Diffstat (limited to 'weed/filer/ydb/ydb_store.go')
-rw-r--r--weed/filer/ydb/ydb_store.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/weed/filer/ydb/ydb_store.go b/weed/filer/ydb/ydb_store.go
index e3f074ed9..90b13aa04 100644
--- a/weed/filer/ydb/ydb_store.go
+++ b/weed/filer/ydb/ydb_store.go
@@ -140,13 +140,13 @@ func (store *YdbStore) doTxOrDB(ctx context.Context, q *string, params *table.Qu
if tx, ok := ctx.Value("tx").(query.Transaction); ok {
res, err = tx.Query(ctx, *q, query.WithParameters(params))
if err != nil {
- return fmt.Errorf("execute transaction: %v", err)
+ return fmt.Errorf("execute transaction: %w", err)
}
} else {
err = store.DB.Query().Do(ctx, func(ctx context.Context, s query.Session) (err error) {
res, err = s.Query(ctx, *q, query.WithParameters(params), ts)
if err != nil {
- return fmt.Errorf("execute statement: %v", err)
+ return fmt.Errorf("execute statement: %w", err)
}
return nil
}, query.WithIdempotent())
@@ -158,7 +158,7 @@ func (store *YdbStore) doTxOrDB(ctx context.Context, q *string, params *table.Qu
defer func() { _ = res.Close(ctx) }()
if processResultFunc != nil {
if err = processResultFunc(res); err != nil {
- return fmt.Errorf("process result: %v", err)
+ return fmt.Errorf("process result: %w", err)
}
}
}