Skip to content

Conversation

@alexjpwalker
Copy link
Member

@alexjpwalker alexjpwalker commented Apr 7, 2021

What is the goal of this PR?

Previously the field req_id of a transaction request was stored as a string, which is an inefficient representation of a UUID. We've changed it to bytes.

Also, we deleted IsInferred and added the inferred flag to Thing, allowing clients to check if a Thing is inferred without an additional network roundtrip.

What are the changes implemented in this PR?

Store request IDs as bytes, not strings (fixes #134 )
Add 'inferred' to Thing (fixes typedb/typedb-driver#314 )

@alexjpwalker alexjpwalker added this to the 2.0.1 milestone Apr 7, 2021
@alexjpwalker alexjpwalker self-assigned this Apr 7, 2021
#

build --incompatible_strict_action_env --javacopt='--release 8'
build --incompatible_strict_action_env --java_language_version=11 --javacopt='--release 11'
Copy link
Member Author

Choose a reason for hiding this comment

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

See typedb/typedb#6281 - after installing the newest Bazel (by pulling grakn and building it locally) I was no longer able to build protocol. I fixed it by upgrading Bazel and Java in protocol.

@alexjpwalker alexjpwalker changed the title Store request IDs as bytes, not strings Store request IDs as bytes; add 'inferred' to Thing Apr 7, 2021
Thing.SetHas.Req thing_set_has_req = 103;
Thing.UnsetHas.Req thing_unset_has_req = 104;
Thing.GetRelations.Req thing_get_relations_req = 105;
Thing.GetPlaying.Req thing_get_playing_req = 106;
Copy link
Member Author

Choose a reason for hiding this comment

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

Note that moving these around breaks compatibility with older clients - maybe this is a practice we want to abolish going forward?

@haikalpribadi haikalpribadi merged commit 8f5d976 into typedb:master Apr 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Store UUIDs as bytes, not strings Make 'isInferred' a Local Thing method

2 participants