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

Document internal serialization formats, because they matter for PKs (as they're size-limited) #1205

Open
srh opened this issue May 16, 2017 · 0 comments

Comments

@srh
Copy link
Contributor

srh commented May 16, 2017

Pasted from rethinkdb/rethinkdb#6304 -- see for some responses.


Please consider documenting how arrays are serialized, in regards to their use for primary keys. On RethinkDB 2.3.5, a simple r.table("test").get([...]) query shows me this error:

Primary key too long (max 127 characters): [
	123,
	1234567890,
	123,
	"foobar12",
	"0123456789abcdefghijklmnopqrstuvwxyz0123456"
] in ...

I've incorrectly assumed - for no particular reason, just had the impression - that the format was JSON or alike, but it doesn't seem to be the case. At least, I can't imagine how this data could be 128 octets-long (value is accepted if I remove any single character anywhere). Result of r.expr([123, 1234567890, 123, "foobar12", "0123456789abcdefghijklmnopqrstuvwxyz0123456"]).toJsonString().count() is 77, and use of info() on such expression returns a 88-character value (because of extra \ns and \ts).

Can someone please enlighten me? Thanks a lot!

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