Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Make server keep connection open after receiving ES #305

Merged
merged 3 commits into from
Oct 21, 2024

Conversation

litt3
Copy link
Contributor

@litt3 litt3 commented Oct 17, 2024

  • closes Helidon plugin serverStreaming gRPC method immediately closes connection #300
  • tweaks how the PbjProtocolHandler progresses through stream state
    • uses CLOSED and HALF_CLOSED_REMOTE as specified by the http2 spec, rather than using HALF_CLOSED_LOCAL for all cases of the stream ending
  • modifies how the closing of protocol method calls affects method call responses
    • a client completing a stream subscription request should NOT result in the responses being immediately closed. The whole idea of the subscription is that the request can be made, and the server continues to stream responses indefinitely.

@litt3 litt3 requested a review from rbair23 October 17, 2024 14:17
@litt3 litt3 self-assigned this Oct 17, 2024
@litt3 litt3 marked this pull request as ready for review October 17, 2024 14:19
Copy link

github-actions bot commented Oct 17, 2024

JUnit Test Report

   66 files  ±0     66 suites  ±0   2m 29s ⏱️ -12s
1 244 tests ±0  1 241 ✅ ±0   3 💤 ±0  0 ❌ ±0 
7 099 runs  ±0  7 080 ✅ ±0  19 💤 ±0  0 ❌ ±0 

Results for commit 4b98044. ± Comparison against base commit 845c93d.

This pull request removes 8 and adds 7 tests. Note that renamed tests count towards both.
, 1
com.hedera.pbj.runtime.ProtoWriterToolsTest ‑ [1] FLOAT, com.hedera.pbj.runtime.ProtoWriterToolsTest$$Lambda/0x00007f63ec311e20@377e573a, [0.1, 0.5, 100.0], 12, com.hedera.pbj.runtime.ProtoWriterToolsTest$$Lambda/0x00007f63ec312038@76db9048
com.hedera.pbj.runtime.ProtoWriterToolsTest ‑ [1] STRING, com.hedera.pbj.runtime.ProtoWriterToolsTest$$Lambda/0x00007f63ec31eee0@3a70575, [string 1, testing here, testing there], com.hedera.pbj.runtime.ProtoWriterToolsTest$$Lambda/0x00007f63ec31f0f8@5d96d434
com.hedera.pbj.runtime.ProtoWriterToolsTest ‑ [2] BYTES, com.hedera.pbj.runtime.ProtoWriterToolsTest$$Lambda/0x00007f63ec31f310@210635fd, [010203, ff7f0f, 42da07370bff], com.hedera.pbj.runtime.ProtoWriterToolsTest$$Lambda/0x00007f63ec31f528@63814bbe
com.hedera.pbj.runtime.ProtoWriterToolsTest ‑ [2] DOUBLE, com.hedera.pbj.runtime.ProtoWriterToolsTest$$Lambda/0x00007f63ec312250@308a9264, [0.1, 0.5, 100.0, 1.7653472635472653E240], 32, com.hedera.pbj.runtime.ProtoWriterToolsTest$$Lambda/0x00007f63ec312468@7da77305
com.hedera.pbj.runtime.ProtoWriterToolsTest ‑ [3] BOOL, com.hedera.pbj.runtime.ProtoWriterToolsTest$$Lambda/0x00007f63ec312680@3cdfbbef, [true, false, false, true, true, true], 6, com.hedera.pbj.runtime.ProtoWriterToolsTest$$Lambda/0x00007f63ec312898@7a1ddbf1
com.hedera.pbj.runtime.ProtoWriterToolsTest ‑ [4] ENUM, com.hedera.pbj.runtime.ProtoWriterToolsTest$$Lambda/0x00007f63ec312ab0@1e606f64, [Mock for EnumWithProtoMetadata, hashCode: 856901180, Mock for EnumWithProtoMetadata, hashCode: 2112194333, Mock for EnumWithProtoMetadata, hashCode: 1238642607], 3, com.hedera.pbj.runtime.ProtoWriterToolsTest$$Lambda/0x00007f63ec312cc8@605eb072
com.hedera.pbj.runtime.Utf8ToolsTest ‑ [4] 
com.hedera.pbj.runtime.ProtoWriterToolsTest ‑ [1] FLOAT, com.hedera.pbj.runtime.ProtoWriterToolsTest$$Lambda/0x00007f218c311be0@38929da, [0.1, 0.5, 100.0], 12, com.hedera.pbj.runtime.ProtoWriterToolsTest$$Lambda/0x00007f218c311df8@69d667a5
com.hedera.pbj.runtime.ProtoWriterToolsTest ‑ [1] STRING, com.hedera.pbj.runtime.ProtoWriterToolsTest$$Lambda/0x00007f218c31ecf0@c67395, [string 1, testing here, testing there], com.hedera.pbj.runtime.ProtoWriterToolsTest$$Lambda/0x00007f218c31ef08@5fc7255c
com.hedera.pbj.runtime.ProtoWriterToolsTest ‑ [2] BYTES, com.hedera.pbj.runtime.ProtoWriterToolsTest$$Lambda/0x00007f218c31f120@61993d18, [010203, ff7f0f, 42da07370bff], com.hedera.pbj.runtime.ProtoWriterToolsTest$$Lambda/0x00007f218c31f338@6f240187
com.hedera.pbj.runtime.ProtoWriterToolsTest ‑ [2] DOUBLE, com.hedera.pbj.runtime.ProtoWriterToolsTest$$Lambda/0x00007f218c312010@95cecc5, [0.1, 0.5, 100.0, 1.7653472635472653E240], 32, com.hedera.pbj.runtime.ProtoWriterToolsTest$$Lambda/0x00007f218c312228@48b3b1b8
com.hedera.pbj.runtime.ProtoWriterToolsTest ‑ [3] BOOL, com.hedera.pbj.runtime.ProtoWriterToolsTest$$Lambda/0x00007f218c312440@b86cb18, [true, false, false, true, true, true], 6, com.hedera.pbj.runtime.ProtoWriterToolsTest$$Lambda/0x00007f218c312658@29c244e
com.hedera.pbj.runtime.ProtoWriterToolsTest ‑ [4] ENUM, com.hedera.pbj.runtime.ProtoWriterToolsTest$$Lambda/0x00007f218c312870@6cc8da1c, [Mock for EnumWithProtoMetadata, hashCode: 859156431, Mock for EnumWithProtoMetadata, hashCode: 1523941008, Mock for EnumWithProtoMetadata, hashCode: 439636632], 3, com.hedera.pbj.runtime.ProtoWriterToolsTest$$Lambda/0x00007f218c312a88@574ebdaf
com.hedera.pbj.runtime.Utf8ToolsTest ‑ [4] 
, 1

♻️ This comment has been updated with latest results.

Copy link
Contributor

@mattp-swirldslabs mattp-swirldslabs left a comment

Choose a reason for hiding this comment

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

From a black box perspective, the code appears to fix the issue. You might ping another PBJ maintainer to take a look too.

@litt3 litt3 marked this pull request as draft October 18, 2024 16:49
Copy link

Integration Test Report

    296 files  +  7      296 suites  +7   8m 34s ⏱️ -8s
104 151 tests +422  104 151 ✅ +422  0 💤 ±0  0 ❌ ±0 
104 379 runs  +422  104 379 ✅ +422  0 💤 ±0  0 ❌ ±0 

Results for commit 4b98044. ± Comparison against base commit 845c93d.

This pull request removes 3 and adds 425 tests. Note that renamed tests count towards both.
com.hedera.pbj.intergration.test.ParserNeverWrapsTest ‑ [1] com.hedera.pbj.intergration.test.ParserNeverWrapsTest$$Lambda/0x00007ff65c4e1990@43bd69e0
com.hedera.pbj.intergration.test.ParserNeverWrapsTest ‑ [2] com.hedera.pbj.intergration.test.ParserNeverWrapsTest$$Lambda/0x00007ff65c4e1bc8@234ee7b9
com.hedera.pbj.intergration.test.ParserNeverWrapsTest ‑ [3] com.hedera.pbj.intergration.test.ParserNeverWrapsTest$$Lambda/0x00007ff65c4e2000@16a08d5d
com.hedera.hapi.node.base.tests.QueryHeaderTest ‑ [1435] NoToStringWrapper{com.hedera.hapi.node.base.QueryHeader}
com.hedera.hapi.node.base.tests.QueryHeaderTest ‑ [1436] NoToStringWrapper{com.hedera.hapi.node.base.QueryHeader}
com.hedera.hapi.node.base.tests.QueryHeaderTest ‑ [1437] NoToStringWrapper{com.hedera.hapi.node.base.QueryHeader}
com.hedera.hapi.node.base.tests.QueryHeaderTest ‑ [1438] NoToStringWrapper{com.hedera.hapi.node.base.QueryHeader}
com.hedera.hapi.node.base.tests.QueryHeaderTest ‑ [1439] NoToStringWrapper{com.hedera.hapi.node.base.QueryHeader}
com.hedera.hapi.node.base.tests.QueryHeaderTest ‑ [1440] NoToStringWrapper{com.hedera.hapi.node.base.QueryHeader}
com.hedera.hapi.node.base.tests.QueryHeaderTest ‑ [1441] NoToStringWrapper{com.hedera.hapi.node.base.QueryHeader}
com.hedera.hapi.node.base.tests.TransactionTest ‑ [1435] NoToStringWrapper{com.hedera.hapi.node.base.Transaction}
com.hedera.hapi.node.base.tests.TransactionTest ‑ [1436] NoToStringWrapper{com.hedera.hapi.node.base.Transaction}
com.hedera.hapi.node.base.tests.TransactionTest ‑ [1437] NoToStringWrapper{com.hedera.hapi.node.base.Transaction}
…

@litt3 litt3 marked this pull request as ready for review October 21, 2024 14:16
Copy link
Contributor

@anthony-swirldslabs anthony-swirldslabs left a comment

Choose a reason for hiding this comment

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

LGTM.

@litt3 litt3 changed the base branch from main to 00306-block-node-helidon October 21, 2024 20:20
@litt3 litt3 merged commit 1d6360f into 00306-block-node-helidon Oct 21, 2024
10 checks passed
@litt3 litt3 deleted the 00300-helidon-streaming-fix branch October 21, 2024 20:20
@litt3 litt3 restored the 00300-helidon-streaming-fix branch November 4, 2024 18:11
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.

Helidon plugin serverStreaming gRPC method immediately closes connection
3 participants