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 netty sequence ability to log subsequent reads and writes #1538

Conversation

arowe-adaptive
Copy link
Contributor

Description

This fixes the bug with the Netty module where it doesn't log subsequent requests. The issue is that the Sequence class that manages sequential processing of reads, then writes has a bug. The method runEagerly() keeps track of a next pointer that tells it which task to run. The problem, also described in the linked issue, is the next pointer is never reset back to the first position in the task array. Applying the suggested changes have fixed the issue. I tested this in a Micronaut app and it is now logging all requests from the server and client reliably. I also wrote a new unit tests showing the Sequence can be reused to process new tasks/requests/responses. Also I wrote the unit test first to ensure it fails without the change.

Motivation and Context

Fixes 1216

Types of changes

  • [ x] Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • [ x] I have added tests to cover my changes.

@whiskeysierra
Copy link
Collaborator

👍

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.

Logbook only logs once with Netty module
3 participants