Skip to content

[tests] Add DynamicWriteBatchSizeEstimator integration tests#643

Open
Prajwal-banakar wants to merge 2 commits into
apache:mainfrom
Prajwal-banakar:integration-tests
Open

[tests] Add DynamicWriteBatchSizeEstimator integration tests#643
Prajwal-banakar wants to merge 2 commits into
apache:mainfrom
Prajwal-banakar:integration-tests

Conversation

@Prajwal-banakar

Copy link
Copy Markdown
Contributor

Purpose

Linked issue: close #539

Adds integration tests for DynamicWriteBatchSizeEstimator to verify end-to-end write correctness through a real cluster for all four scenarios described in the issue.

Brief change log

  • Added crates/fluss/tests/integration/dynamic_batch_size.rs with 4 integration tests covering:
    • Many small rows cause the estimator to shrink batch size toward min
    • Rows close to batch size cause the estimator to grow toward max
    • Disabled config keeps the static writer_batch_size unchanged
    • Concurrent writers from separate connections don't corrupt estimator state
  • Registered the new module in crates/fluss/tests/test_fluss.rs

Tests

  • small_rows_shrink_batch_size — writes 200 tiny rows with dynamic sizing enabled; verifies all writes succeed
  • large_rows_grow_batch_size — writes rows filling >80% of batch capacity; verifies all writes succeed
  • disabled_keeps_static_batch_size — writes with writer_dynamic_batch_size_enabled = false; verifies all writes succeed
  • concurrent_writers_dont_corrupt_state — spawns 4 concurrent writer tasks each with its own connection; verifies all writes succeed without errors

API and Format

No changes to API or storage format.

Documentation

No new feature introduced. This PR only adds integration tests for an existing feature.

@Prajwal-banakar Prajwal-banakar changed the title Integration tests [tests] Add DynamicWriteBatchSizeEstimator integration tests Jun 27, 2026
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.

[rust][tests] Add DynamicWriteBatchSizeEstimator integration tests

1 participant