Skip to content

V3 streaming cli poc - #678

Merged
kkin-here merged 7 commits into
v3from
v3_streaming_cli_poc
Nov 5, 2026
Merged

kkin-here merged 7 commits into
v3from
v3_streaming_cli_poc

Conversation

@kkin-here

Copy link
Copy Markdown

No description provided.

@github-actions

This comment was marked as off-topic.

@kkin-here
kkin-here force-pushed the v3_streaming_cli_poc branch from d297185 to ffb062f Compare October 20, 2026 12:52
@github-actions

This comment was marked as off-topic.

@kkin-here
kkin-here marked this pull request as ready for review October 20, 2026 12:58
super(session, request, session.getOptions(), request.sequential() ? 1 : 16);
this.config = config;
this.states = request.queryHistory() ? config.statesPerFeature() : 1;
this.start = request.getRaw(CURSOR) instanceof Number n ? n.longValue() : 0L;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This duplicates StreamRequest.minVersion() I feel?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minVersion is a version filter of the request, but random has no versions, its position is state * count + index. Putting that into minVersion would make the recovery request claim a version range that doesn’t exist. minVersion is used for example in v3 reader draft I created, because there position really is a version.

Object v = e.getValue();
copy.put(e.getKey(), v instanceof Id id ? id.text() : v);
}
return Platform.toJSON(copy);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need a copy here? Platform.toJSON(request) seems enough.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to fix Id class, rather than having this workaround.

@gunplar gunplar Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, add an if in Platform.unbox(), if it's Id then unbox to value.text.

EDIT: sorry this might be wrong in the grand scheme of Proxy. But that's my idea of targeting this problem. I would want to avoid cloning objects like this as it impacts performance.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fair point, fixed: I added a jackson serializer for Id in lib-base that writes the text, so toJson requires no copies now

@github-actions

This comment was marked as off-topic.

gunplar
gunplar previously approved these changes Oct 30, 2026
@github-actions

This comment was marked as off-topic.

@gunplar gunplar left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. We can continue refining if needed later.

Signed-off-by: kkin-here <284318677+kkin-here@users.noreply.github.com>
Signed-off-by: kkin-here <284318677+kkin-here@users.noreply.github.com>
…-C, clearer config and resume errors

Signed-off-by: kkin-here <284318677+kkin-here@users.noreply.github.com>
… ignoreTransactions

Signed-off-by: kkin-here <284318677+kkin-here@users.noreply.github.com>
… commands on the new write and recovery contract

Signed-off-by: kkin-here <284318677+kkin-here@users.noreply.github.com>
Signed-off-by: kkin-here <284318677+kkin-here@users.noreply.github.com>
…ntil discussed

Signed-off-by: kkin-here <284318677+kkin-here@users.noreply.github.com>
@kkin-here
kkin-here force-pushed the v3_streaming_cli_poc branch from 1310fa6 to e231c08 Compare November 5, 2026 12:03
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

Code Coverage

Overall Project 61.48% -0.59% 🍏
Files changed 80.08% 🍏

File Coverage
GeneratingStorageService.java 100% 🍏
NullStorageProvider.java 100% 🍏
NakshaCliCommand.java 100% 🍏
CommandFactory.java 100% 🍏
IdSerializer.kt 100% 🍏
ProviderCommand.java 100% 🍏
CliCommand.java 100% 🍏
StreamRequestJson.java 100% 🍏
StreamDefinition.java 95.43% -4.57% 🍏
Json.java 94.69% -5.31% 🍏
ConfigCommand.java 91.24% -8.76% 🍏
CliContext.java 91.01% -8.99% 🍏
StreamCommand.java 89.79% -10.21% 🍏
StorageConfig.java 89.06% -10.94% 🍏
RandomStorageProvider.java 87.59% -12.41% 🍏
SyncService.java 78.85% -21.15% 🍏
JsonFileStore.java 78.24% -21.76% 🍏
StorageProviders.java 76.92% -23.08% 🍏
QueueStream.kt 74.04% -25.96% 🍏
StreamOnlyStorage.java 69.14% -30.86% 🍏
Platform.kt 65.64% 🍏
SyncCommand.java 64.61% -35.39% 🍏
Questions.java 59.19% -40.81% 🍏
AbstractStreamSession.kt 45.59% -54.41% 🍏
NoQuestions.java 28% -72% 🍏

@kkin-here
kkin-here merged commit 490c8e2 into v3 Nov 5, 2026
3 checks passed
@kkin-here
kkin-here deleted the v3_streaming_cli_poc branch November 5, 2026 12:18
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.

2 participants