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

dont set n.ops map entries to nil. Instead just delete them #5551

Merged
merged 2 commits into from
Jun 1, 2020

Conversation

parasssh
Copy link
Contributor

@parasssh parasssh commented May 31, 2020

A panic was caused because n.ops map entry was set to nil in some cases.
Fix is to not set n.ops map entries to nil. Instead, just delete them.
Fixed DGRAPH-1573


This change is Reviewable

@parasssh parasssh changed the title dont set map entries to nil. Instead just delete them dont set n.ops map entries to nil. Instead just delete them May 31, 2020
Copy link
Contributor

@jarifibrahim jarifibrahim left a comment

Choose a reason for hiding this comment

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

The change looks good but can we please add a test for this? I understand we don't have any tests for it currently but without tests it's very hard to determine if we've fixed the issue or not.

Reviewable status: 0 of 1 files reviewed, all discussions resolved (waiting on @manishrjain and @vvbalaji-dgraph)

Copy link
Contributor

@martinmr martinmr 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.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @manishrjain, @parasssh, and @vvbalaji-dgraph)


worker/draft.go, line 140 at r1 (raw file):

				return nil, errors.Errorf("another restore operation is already running")
			}
			// remove from map and signal the closer to cancel the operation.

minor: uppercase


worker/draft.go, line 147 at r1 (raw file):

		for otherId, otherCloser := range n.ops {
			if otherId == opRollup {
				// remove from map and signal the closer to cancel the operation.

minor: uppercase

Copy link
Contributor

@ashish-goswami ashish-goswami left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @manishrjain, @parasssh, and @vvbalaji-dgraph)

Copy link
Contributor

@jarifibrahim jarifibrahim left a comment

Choose a reason for hiding this comment

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

:lgtm_strong: I had a chat with @parasssh and we concluded that adding test isn't straight forward.

Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @manishrjain, @parasssh, and @vvbalaji-dgraph)

@parasssh parasssh merged commit b05c525 into master Jun 1, 2020
@parasssh parasssh deleted the paras/jira_1353_panic_ops branch June 1, 2020 18:47
parasssh pushed a commit that referenced this pull request Jun 1, 2020
dont set n.ops map entries to nil. Instead just delete them (#5551)

A panic was caused because n.ops map entry was set to nil in some cases.
Fix is to not set n.ops map entries to nil. Instead, just delete them.
Fixed DGRAPH-1573
parasssh pushed a commit that referenced this pull request Jun 3, 2020
dont set n.ops map entries to nil. Instead just delete them (#5551)

A panic was caused because n.ops map entry was set to nil in some cases.
Fix is to not set n.ops map entries to nil. Instead, just delete them.
Fixed DGRAPH-1573
dna2github pushed a commit to dna2fork/dgraph that referenced this pull request Jul 18, 2020
…einc#5551)

A panic was caused because n.ops map entry was set to nil in some cases.
Fix is to not set n.ops map entries to nil. Instead, just delete them.
Fixed DGRAPH-1573
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants