Skip to content

maxBufferedBytes in addition to blockLengh #537

@brunsgaard

Description

@brunsgaard

Hi @nrwiersma,

First of all, thank you for your work on this project. We’ve been using this library to write terabytes of OCF files per day, and it has been running flawlessly for years - much appreciated!

We're currently encountering an issue where one of our applications hits OOM errors when writing very large individual records because the buffer can grow unbonded before writeBlocks() is triggered. (only blockLengh is taken into account)

Would it be possible to add an additional trigger in ocf.Encoder that calls writeBlocks() based on the current buffer size, not just the block lengh? This would help us better control memory usage for workloads with large record sizes.

We are using the raw ocf.Encoder.Write method.

Happy to help test or submit a PR if needed.

edit: Maybe blocksize is the wrong term as the block might be compressed, but maxBufferedBytes then :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions