Skip to content

feat(destinations): Add BatchSize method to ManagedWriter interface#539

Closed
erezrokah wants to merge 1 commit intocloudquery:mainfrom
erezrokah:feat/add_batch_size_managed_writer
Closed

feat(destinations): Add BatchSize method to ManagedWriter interface#539
erezrokah wants to merge 1 commit intocloudquery:mainfrom
erezrokah:feat/add_batch_size_managed_writer

Conversation

@erezrokah
Copy link
Copy Markdown
Member

Summary

Batch size should be configured at the plugin level spec (see https://www.cloudquery.io/docs/plugins/destinations/bigquery/overview#bigquery-spec).
This PR adds a BatchSize interface method to be called by the managed writer.

This can't be done via a plugin option, as we read the plugin spec after the plugin is created (options are passed on creation)


Use the following steps to ensure your PR is ready to be reviewed

  • Read the contribution guidelines 🧑‍🎓
  • Run go fmt to format your code 🖊
  • Lint your changes via golangci-lint run 🚨 (install golangci-lint here)
  • Update or add tests 🧪
  • Ensure the status checks below are successful ✅

@github-actions
Copy link
Copy Markdown

github-actions bot commented Dec 28, 2022

⏱️ Benchmark results

Comparing with e4bfc37

  • DefaultConcurrency-2 resources/s: 12,222 ⬆️ 6.24% increase vs. e4bfc37
  • Glob-2 ns/op: 157.6 ⬆️ 4.95% increase vs. e4bfc37
  • TablesWithChildrenDefaultConcurrency-2 resources/s: 30,663 ⬆️ 4.30% increase vs. e4bfc37
  • BufferedScanner-2 ns/op: 9.629 ⬆️ 2.52% increase vs. e4bfc37
  • LogReader-2 ns/op: 30.74 ⬇️ 0.10% decrease vs. e4bfc37

@erezrokah erezrokah force-pushed the feat/add_batch_size_managed_writer branch from 90f68da to 445f8b4 Compare December 28, 2022 15:48
@erezrokah
Copy link
Copy Markdown
Member Author

Replaced by #540

@erezrokah erezrokah closed this Dec 28, 2022
@erezrokah erezrokah deleted the feat/add_batch_size_managed_writer branch December 28, 2022 15:51
kodiakhq bot pushed a commit that referenced this pull request Dec 28, 2022

Replaces #539. Keeps batch size on the top level spec, but allows plugins to override it

---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant