Please describe why this is necessary.
Parallel scan state can contain a large HashSet<FileActionKey>. The convenience
ParallelState::into_bytes path currently serializes the entire SerializableScanState as JSON.
For large seen-file sets this repeats JSON structure, stores string lengths indirectly through
syntax, requires escaping, and creates substantial transient allocation and transfer volume.
SerializableScanState already documents that connectors may choose a compact binary
representation, but the built-in byte representation remains JSON and offers no compact default.
Describe the functionality you are proposing.
Introduce a versioned compact encoding for the seen-file keys used by the built-in parallel-state
byte path. One possible representation is a single length-prefixed byte buffer containing paths
and optional deletion-vector IDs. Keep the decoded in-memory hash set for lookup; this issue is
about serialization size and transient encode/decode memory, not replacing random-access dedup
state with a sequential buffer.
The format should:
- preserve exact path and deletion-vector identity;
- validate lengths and allocation bounds while decoding;
- retain the equal-binary-version contract or carry an explicit format version; and
- report clear errors for malformed or truncated input.
Benchmark serialized size, encode/decode time, and peak allocation against JSON for small and large
seen-file sets. If the default path is not worth changing, provide a reusable compact codec for
connectors instead.
Please describe why this is necessary.
Parallel scan state can contain a large
HashSet<FileActionKey>. The convenienceParallelState::into_bytespath currently serializes the entireSerializableScanStateas JSON.For large seen-file sets this repeats JSON structure, stores string lengths indirectly through
syntax, requires escaping, and creates substantial transient allocation and transfer volume.
SerializableScanStatealready documents that connectors may choose a compact binaryrepresentation, but the built-in byte representation remains JSON and offers no compact default.
Describe the functionality you are proposing.
Introduce a versioned compact encoding for the seen-file keys used by the built-in parallel-state
byte path. One possible representation is a single length-prefixed byte buffer containing paths
and optional deletion-vector IDs. Keep the decoded in-memory hash set for lookup; this issue is
about serialization size and transient encode/decode memory, not replacing random-access dedup
state with a sequential buffer.
The format should:
Benchmark serialized size, encode/decode time, and peak allocation against JSON for small and large
seen-file sets. If the default path is not worth changing, provide a reusable compact codec for
connectors instead.