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

Typo in proj1-2 code comments #138

Open
ccjeff opened this issue Jun 30, 2022 · 0 comments
Open

Typo in proj1-2 code comments #138

ccjeff opened this issue Jun 30, 2022 · 0 comments

Comments

@ccjeff
Copy link

ccjeff commented Jun 30, 2022

In tableCodec.go, line 146, the comment is suggesting to use errInvalidRecordKey.GenWithStack whereas the function is decoding index prefix key. Might be better to consider changing this into using errInvalidIndexKey.GenWithStack.

func DecodeIndexKeyPrefix(key kv.Key) (tableID int64, indexID int64, indexValues []byte, err error) {
	...
	 *   3. errInvalidRecordKey.GenWithStack is a useful function to generate invalid record key errors.
	 ...
}

To

func DecodeIndexKeyPrefix(key kv.Key) (tableID int64, indexID int64, indexValues []byte, err error) {
	...
	 *   3. errInvalidIndexKey.GenWithStack is a useful function to generate invalid record key errors.
	 ...
}
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

No branches or pull requests

1 participant