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

storage: Minor code cleanups #14270

Merged
merged 1 commit into from
Mar 20, 2017
Merged

Conversation

a-robinson
Copy link
Contributor

@a-robinson a-robinson commented Mar 20, 2017

@tamird


This change is Reviewable

@tamird
Copy link
Contributor

tamird commented Mar 20, 2017

:lgtm:


Reviewed 1 of 1 files at r1.
Review status: all files reviewed at latest revision, 3 unresolved discussions, all commit checks successful.


pkg/storage/store.go, line 2985 at r1 (raw file):

	// Snapshots addressed to replica ID 0 are permitted; this is the
	// mechanism by which preemptive snapshots work.
	// No other requests to replica ID 0 are allowed.

separate this with an empty comment line


pkg/storage/store.go, line 2992 at r1 (raw file):

			// only way we can get here is if the replica did not previously exist.
			if log.V(1) {
				log.Infof(ctx, "refusing incoming Raft message %s from %+v to %+v",

nit: log.VEventf while you're here


pkg/storage/store.go, line 2997 at r1 (raw file):

			return roachpb.NewErrorf(
				"cannot recreate replica that is not a member of its range (StoreID %s not found in r%d)",
				r.store.StoreID(), req.RangeID)

nit: closing paren on the next line for symmetry


Comments from Reviewable

* Add more detail to Fatal log message hit by cockroachdb#14193
* Improve nasty indentation in `processRaftRequest` by moving the error
  check above the normal code path
* Fix `removePlaceholderLocked` method comment
@a-robinson
Copy link
Contributor Author

Review status: 0 of 1 files reviewed at latest revision, 3 unresolved discussions.


pkg/storage/store.go, line 2985 at r1 (raw file):

Previously, tamird (Tamir Duberstein) wrote…

separate this with an empty comment line

Done.


pkg/storage/store.go, line 2992 at r1 (raw file):

Previously, tamird (Tamir Duberstein) wrote…

nit: log.VEventf while you're here

Done.


pkg/storage/store.go, line 2997 at r1 (raw file):

Previously, tamird (Tamir Duberstein) wrote…

nit: closing paren on the next line for symmetry

Done.


Comments from Reviewable

@tamird
Copy link
Contributor

tamird commented Mar 20, 2017

Reviewed 1 of 1 files at r2.
Review status: :shipit: all files reviewed at latest revision, all discussions resolved, all commit checks successful.


Comments from Reviewable

@a-robinson a-robinson merged commit c710720 into cockroachdb:master Mar 20, 2017
@a-robinson a-robinson deleted the cleanups branch May 18, 2018 20:28
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.

2 participants