Skip to content

Retriable/reusable batches  #728

Open
@beebeeep

Description

@beebeeep

Somewhat related to #529

Suggestion.
Make driver.Batch retriable and/or reusable after Send() - both for the same, or for another connection.
As far as I understood from the code, driver.Batch is tied to the specific connection (guess it is fetching the column types etc from CH), however, it would be tremendously useful to be able to reuse the batch after it was sent once.

Use case

  • Retrying the same batch on the same server in case of some errors
  • Retrying the same batch on the different server (to the same replicated table)
  • Implementing majority writes for better write durability

Right now to implement those features, client has to keep the data for the batch somewhere else, which is not only inconvenient (especially in streaming-style use-cases, where client itself does not have access to all of the data needed to be inserted to CH), but essentially doubles the memory footprint.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions