Skip to content

[Bug]: write table by FFI call from go may memory leak? #3973

@z2665

Description

@z2665

What happened?

memory leak when call delta-rs to write table

Expected behavior

delta-rs uses finite memory instead of infinite growth

Operating System

Linux

Binding

Rust

Bindings Version

0.29.3

Steps to reproduce

MRE: https://github.com/z2665/go_ffi_delta_rs
@abhi-airspace-intelligence

  1. The program receives a -target flag (local or s3) and prepares that table once (creating or cleaning as needed).
  2. For each of the ten iterations it:
    • Opens the target table.
    • Appends 100 synthetic rows.
    • Closes the table and records RSS in megabytes.
  3. Iterations execute every five seconds unless interrupted with Ctrl+C.
  4. After the loop completes, the program writes a single plot named <target>_memory.png.

Run the experiment with:

cd  go_ffi_delta_rs
GOOS=linux GOARCH=amd64 go run . -target local
GOOS=linux GOARCH=amd64 go run . -target s3

write to local result

Image

write to s3 result

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions