Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make batch sizes configurable #4149

Merged
merged 22 commits into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
improove batch-size panic message
  • Loading branch information
kropidlowsky committed Mar 13, 2024
commit 8099fc22316e5fe0745dd1289f2fe01025447ef3
2 changes: 1 addition & 1 deletion internal/backends/postgresql/collection.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
err = pool.InTransaction(ctx, p, func(tx pgx.Tx) error {
batchSize := c.r.BatchSize
kropidlowsky marked this conversation as resolved.
Show resolved Hide resolved
if batchSize < 1 {
panic("batch-size should be greater than 1")
panic("batch-size should be greater or equal to 1")

Check warning on line 139 in internal/backends/postgresql/collection.go

View check run for this annotation

Codecov / codecov/patch

internal/backends/postgresql/collection.go#L139

Added line #L139 was not covered by tests
}

var batch []*types.Document
Expand Down
2 changes: 1 addition & 1 deletion internal/backends/sqlite/collection.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
err := db.InTransaction(ctx, func(tx *fsql.Tx) error {
batchSize := c.r.BatchSize
kropidlowsky marked this conversation as resolved.
Show resolved Hide resolved
if batchSize < 1 {
panic("batch-size should be greater than 1")
panic("batch-size should be greater or equal to 1")

Check warning on line 114 in internal/backends/sqlite/collection.go

View check run for this annotation

Codecov / codecov/patch

internal/backends/sqlite/collection.go#L114

Added line #L114 was not covered by tests
}

var batch []*types.Document
Expand Down
Loading