-
Notifications
You must be signed in to change notification settings - Fork 378
How to determine field sizes #183
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
Comments
In addition to determining field sizes, I noticed that the spec calls out // Indicate that the volume will be accessed via the filesystem API.
message MountVolume {
// The filesystem type. This field is OPTIONAL.
// An empty string is equal to an unspecified field value.
string fs_type = 1;
// The mount options that can be used for the volume. This field is
// OPTIONAL. `mount_flags` MAY contain sensitive information.
// Therefore, the CO and the Plugin MUST NOT leak this information
// to untrusted entities. The total size of this repeated field
// SHALL NOT exceed 4 KiB.
repeated string mount_flags = 2;
} Should the field |
Yes we should clarify the how size is calculated.
Yes, that would be good to do. |
Not a blocker for 1.0.rc |
#132 adds default field size limits to the spec, but I'm not sure the spec clearly identifies how to determine the size of a thing. For example, if using the gRPC wire protocol, a string takes up a byte per character. Therefore identifying the size a
map<string, string>
consumes in Go would entail iterating the key/value pairs, converting them to[]byte
slices, and the summing the lengths of those slices. Since Gostring
types are just arbitrary bytes, it cannot be assumed a string is always UTF-8 (string literals, however, are).Still, that's just calculate the size of a
map<string, string>
in Go, not all other possible languages. I guess the question is, should field size be related to the wire protocol encoding of a field, its elements, a specific encoding, etc.?The text was updated successfully, but these errors were encountered: