Skip to content

Commit 5d4ff3f

Browse files
committed
Upgrade Go bindings for FoundationDB in the sample data loader app
Upgrades the Go bindings in the data-loader sample app, and make sure that opened database connection is closed (by calling Close()).
1 parent 3561d7d commit 5d4ff3f

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

sample-apps/data-loader/go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/FoundationDB/fdb-data-loader
22

3-
go 1.24.0
3+
go 1.25.0
44

5-
// Binding version for 7.1.67
6-
require github.com/apple/foundationdb/bindings/go v0.0.0-20250115161953-f1ab8147ed1c
5+
// Binding version for 7.3.63
6+
require github.com/apple/foundationdb/bindings/go v0.0.0-20250221231555-5140696da2df

sample-apps/data-loader/go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
github.com/apple/foundationdb/bindings/go v0.0.0-20250115161953-f1ab8147ed1c h1:Nnun3T50beIpO6YKDZInHuZMgnNtYJafSlQAvkXwOWc=
22
github.com/apple/foundationdb/bindings/go v0.0.0-20250115161953-f1ab8147ed1c/go.mod h1:OMVSB21p9+xQUIqlGizHPZfjK+SHws1ht+ZytVDoz9U=
3+
github.com/apple/foundationdb/bindings/go v0.0.0-20250221231555-5140696da2df h1:XlE/l8moueBRTJr7xt0/9f0HJ1FaLupzguIKoj0a74g=
4+
github.com/apple/foundationdb/bindings/go v0.0.0-20250221231555-5140696da2df/go.mod h1:OMVSB21p9+xQUIqlGizHPZfjK+SHws1ht+ZytVDoz9U=

sample-apps/data-loader/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ func loadData(ctx context.Context, keys int, batchSize int, valueSize int, clust
4444
if err != nil {
4545
log.Fatalf("could not open database: %s", err)
4646
}
47+
defer db.Close()
4748

4849
err = db.Options().SetTransactionTimeout(10 * time.Second.Milliseconds())
4950
if err != nil {
@@ -79,7 +80,6 @@ func loadData(ctx context.Context, keys int, batchSize int, valueSize int, clust
7980

8081
return nil, nil
8182
})
82-
8383
if err != nil {
8484
log.Printf("could not write data: %s\n", err)
8585
}

0 commit comments

Comments
 (0)