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 nil values being added to the reply slice #36

Merged
merged 6 commits into from
Sep 28, 2017
Merged

Conversation

s111
Copy link
Contributor

@s111 s111 commented Sep 24, 2017

TestPerNodeArg is left failing to demonstrate the issue.
The test should fail while in master is succeeds.
I'll fix it when we agree whether this is a good solution.
See #35.

TestPerNodeArg is left failing to demonstrate the issue.
See #35.
@@ -120,7 +120,8 @@ func (c *Configuration) readCorrectableStream(ctx context.Context, a *ReadReques
}()
}

replyChan := make(chan internalState, c.n)
expected := c.n
Copy link
Contributor

Choose a reason for hiding this comment

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

I haven't looked at this PR closely yet.

But this code is not needed? (It does nothing new/change the logic).
Maybe you didn't mean this intentionally since it's a result of the code generation.

And for stream correctables there are no notion of "expected", since the servers can return an arbitrary number of replies.

Copy link
Member

Choose a reason for hiding this comment

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

The expected variable is technically only needed for the per_node_arg option, but it is perhaps easier to just keep it for both cases to avoid yet another {{if .PerNodeArg}} conditional in the template code. To understand when it is needed you need to look at the generated writePerNode function in calltype_quorumcall_gen.go.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, my comment was only targeted at the correctables and not in general.

meling and others added 5 commits September 24, 2017 16:40
TestPerNodeArg is left failing to demonstrate the issue.
See #35.
there is still an outstanding issue related to nil inputs;
they don't always panic.
(the Write test does not work; see TODO comment inline)
@meling meling merged commit 1a8346d into master Sep 28, 2017
@meling
Copy link
Member

meling commented Sep 28, 2017

Merging this into master now. Further changes can be done on master, if there are remaining issues.

@meling meling deleted the fix-nil-in-replies branch September 28, 2017 19:05
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.

3 participants