Skip to content

CI: add stateful streaming tests for C++ and Java#48

Open
zhanglistar wants to merge 31 commits into
gluten-0530from
codex/stateful-streaming-tests
Open

CI: add stateful streaming tests for C++ and Java#48
zhanglistar wants to merge 31 commits into
gluten-0530from
codex/stateful-streaming-tests

Conversation

@zhanglistar

Copy link
Copy Markdown
Member

Add StatefulStreamingTest.cc (C++) and StatefulStreamingTest.java (Java) covering:

  • Basic streaming data flow through StatefulTask::next()
  • Multiple batch consumption from Values node
  • Checkpoint snapshot/notifyCheckpointComplete/notifyCheckpointAborted
  • Mid-stream snapshot before task finishes
  • Watermark notification

C++ tests use StatefulTask directly with StatefulPlanNode wrapping. Java tests use SerialTask.statefulGet() through the JNI bridge.

Note: C++ tests pass individually but may crash when run together due to velox MemoryManager pool lifecycle management in the test fixture. Java tests all pass.

Add StatefulStreamingTest.cc (C++) and StatefulStreamingTest.java (Java)
covering:
- Basic streaming data flow through StatefulTask::next()
- Multiple batch consumption from Values node
- Checkpoint snapshot/notifyCheckpointComplete/notifyCheckpointAborted
- Mid-stream snapshot before task finishes
- Watermark notification

C++ tests use StatefulTask directly with StatefulPlanNode wrapping.
Java tests use SerialTask.statefulGet() through the JNI bridge.

Note: C++ tests pass individually but may crash when run together due
to velox MemoryManager pool lifecycle management in the test fixture.
Java tests all pass.
@zhanglistar zhanglistar force-pushed the codex/stateful-streaming-tests branch from c795958 to ae1aaf6 Compare June 29, 2026 10:40
Fixes the CMake 'tools' target conflict that occurs when both RocksDB
and gRPC are built BUNDLED (each creates an add_custom_target named
'tools'). By pre-installing these as system libraries in /usr/local,
Velox's AUTO dependency resolution will find them via find_package and
skip the BUNDLED FetchContent build entirely.

Also cleans up all build artifacts and downloaded sources to minimize
image size.
The original Velox grpc.cmake uses 'git apply' for PATCH_COMMAND,
which silently fails because FetchContent with URL downloads a
tarball (not a git repo). This leaves the 'tools' target unrenamed,
causing a conflict with RocksDB's 'tools' target.

The override uses 'patch -p1 -i' which works on tarball sources.
Velox's setup-ubuntu.sh installs fmt, folly, boost, protobuf, thrift,
arrow, geos, stemmer, duckdb, librdkafka, cppkafka, fizz, wangle, mvfst,
fbthrift into /usr/local. But it does NOT install: c-ares, double-conversion,
xsimd, simdjson, absl, re2, gRPC, RocksDB, GTest.

These were being built via FetchContent on every CI run, causing:
1. Slow CI (recompiling deps each time)
2. RocksDB/gRPC 'tools' target conflict

Now all deps are pre-installed in the Docker image so Velox's AUTO
resolution finds them via find_package() and skips BUNDLED entirely.
Dep upgrades only require rebuilding the Docker image.
@zhanglistar zhanglistar changed the title test: add stateful streaming tests for C++ and Java CI: add stateful streaming tests for C++ and Java Jul 2, 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.

1 participant