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(archive): archive final messages sent to client #34

Merged
merged 2 commits into from
Jan 10, 2024

Conversation

stephen-soltesz
Copy link
Contributor

@stephen-soltesz stephen-soltesz commented Jan 9, 2024

Previously, #30 ensured that before closing the connection a final measurement message was sent to the client. However, that message was not saved in the archival result.

This change ensures that the final measurement is saved to the archival results.

Fixes: #32


This change is Reviewable

@coveralls
Copy link

coveralls commented Jan 9, 2024

Pull Request Test Coverage Report for Build 7478717470

Warning: This coverage report may be inaccurate.

We've detected an issue with your CI configuration that might affect the accuracy of this pull request's coverage report.
To ensure accuracy in future PRs, please see these guidelines.
A quick fix for this PR: rebase it; your next report should be accurate.

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.1%) to 69.992%

Totals Coverage Status
Change from base Build 7453335104: -0.1%
Covered Lines: 877
Relevant Lines: 1253

💛 - Coveralls

Copy link
Contributor

@robertodauria robertodauria left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 1 approvals obtained (waiting on @stephen-soltesz)


pkg/throughput1/protocol.go line 235 at r1 (raw file):

}

func (p *Protocol) sendAndSaveWireMessage(ctx context.Context, m model.Measurement, results chan<- model.WireMeasurement) error {

I find the name a bit confusing:sendAndSave but it sends twice (first over the network, then over a chan).

Copy link
Contributor Author

@stephen-soltesz stephen-soltesz left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 1 of 1 approvals obtained (waiting on @robertodauria)


pkg/throughput1/protocol.go line 235 at r1 (raw file):

Previously, robertodauria (Roberto D'Auria) wrote…

I find the name a bit confusing:sendAndSave but it sends twice (first over the network, then over a chan).

Oh, I think you're right. I was thinking of the ServerMeasurements where the results are stored.. but that's a layer violation - this package has no idea the results are saved in the handler package.

I've renamed to saveAndPublishWireMeasurement throughout. ("WireMessage" was actually a typo for "WireMeasurement" originally).

@stephen-soltesz stephen-soltesz merged commit b1ce96b into main Jan 10, 2024
7 checks passed
@stephen-soltesz stephen-soltesz deleted the sandbox-soltesz-keep-last-message branch January 10, 2024 17:43
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.

data: all WireMeasurements should be saved to archival storage
3 participants