Skip to content

Conversation

@gruuya
Copy link
Contributor

@gruuya gruuya commented Jul 8, 2024

As opposed to keying them via their root URL.

@gruuya gruuya requested review from SergeiPatiakin and mildbyte July 8, 2024 10:25
message TableObject {
string name = 1;
// Path within the provided storage location, if any
string path = 2;
Copy link
Collaborator

@SergeiPatiakin SergeiPatiakin Jul 9, 2024

Choose a reason for hiding this comment

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

I know we don't care about backwards compatibility here, but should we try to follow Protobuf guidelines on field number assignment?: https://protobuf.dev/programming-guides/proto3/#assigning . This could help make errors clearer in case of a server/client protocol mismatch.

Specifically:

  • NewProtocol.TableObject.store seems like a distinct field from OldProtocol.TableObject.location, so should use a new field number
  • NewProtocol.StorageLocation.location seems like the same field as OldProtocol.StorageLocation.location, so should stay as field number 1
  • NewProtocol.StorageLocation.options seems like the same field as OldProtocol.StorageLocation.options, so should stay as field number 2

&self,
table: TableObject,
store_options: &HashMap<String, HashMap<String, String>>,
store_options: &HashMap<String, (String, HashMap<String, String>)>,
Copy link
Collaborator

@SergeiPatiakin SergeiPatiakin Jul 9, 2024

Choose a reason for hiding this comment

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

There's 4 Strings in this type and it wasn't clear on first reading what each of them is. Maybe add a comment about this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, will do.

@gruuya gruuya merged commit 90839ec into main Jul 12, 2024
@gruuya gruuya deleted the clade-storage-location-id branch July 12, 2024 08:13
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.

3 participants