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 panic in dagreader with raw nodes #3403

Merged
merged 5 commits into from
Nov 22, 2016
Merged

Conversation

Kubuxu
Copy link
Member

@Kubuxu Kubuxu commented Nov 21, 2016

This doesn't resolve issue yet, I have to refactor a bit so and I want to run CI over this refactor.

Resolves #3399

@Kubuxu Kubuxu added the status/in-progress In progress label Nov 21, 2016
@Kubuxu
Copy link
Member Author

Kubuxu commented Nov 21, 2016

Ooops, I broke tests.

License: MIT
Signed-off-by: Jakub Sztandera <[email protected]>
License: MIT
Signed-off-by: Jakub Sztandera <[email protected]>
@Kubuxu
Copy link
Member Author

Kubuxu commented Nov 21, 2016

Should be fixed. Let's see CI run.

License: MIT
Signed-off-by: Jakub Sztandera <[email protected]>
Copy link
Member

@whyrusleeping whyrusleeping left a comment

Choose a reason for hiding this comment

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

Good catch and fix @Kubuxu, what would I do without you :)

Before we merge this, lets dry it up a bit, the overlap between the old NewRNSC stuff and the bufDagReader code seems a bit off.

"io"
)

type bufDagReader struct {
Copy link
Member

Choose a reason for hiding this comment

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

Why don't we go ahead and replace all of the NewRNSC stuff with this now? It seems weird that they both serve roughly the same purpose.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, the interface of DagReader supersedes RSC and bufDagReader is nop-closers on bytes.

}
dr.linkPosition++

switch nxt := nxt.(type) {
Copy link
Member

Choose a reason for hiding this comment

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

This should just call NewDagReader now, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Not really, as cases for Dir, metadata and symlinks are a bit different.

Copy link
Member Author

Choose a reason for hiding this comment

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

Handled it a bit differently.

Copy link
Member

Choose a reason for hiding this comment

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

Are you sure? They look like the same piece of code...

Copy link
Member

@whyrusleeping whyrusleeping left a comment

Choose a reason for hiding this comment

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

Alright, i get it now. LGTM!

@whyrusleeping whyrusleeping merged commit 0fcb92f into master Nov 22, 2016
@whyrusleeping whyrusleeping deleted the feat/dg-reader-cleanup branch November 22, 2016 19:30
@whyrusleeping whyrusleeping removed the status/in-progress In progress label Nov 22, 2016
@ghost ghost mentioned this pull request Dec 23, 2016
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.

Panic in gateway trying to access raw leaf node
2 participants