diff options
author | 2015-06-02 22:13:47 +0000 | |
---|---|---|
committer | 2015-06-03 13:49:02 +0000 | |
commit | 0732cad9677ec1c4a1e7138df2c00daa083ab0dc (patch) | |
tree | 4b8582e6d31075c9ff4b49689b6c81a130545bd2 /src/main/protobuf | |
parent | f7ff616b36a980e344d240066c909b8995a1ea37 (diff) |
Serialize Packages as a series of protocol buffers
Packages have the potential to have an exceptional number of associated
targets. When serialized in one message these targets can push the
protocol buffer representation of a Package over the default deserialization
size limit. In this commit we serialize targets separately as a series of
individual messages to avoid this limit.
--
MOS_MIGRATED_REVID=95049743
Diffstat (limited to 'src/main/protobuf')
-rw-r--r-- | src/main/protobuf/build.proto | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/main/protobuf/build.proto b/src/main/protobuf/build.proto index 8dfda7ed5a..895035664a 100644 --- a/src/main/protobuf/build.proto +++ b/src/main/protobuf/build.proto @@ -344,6 +344,20 @@ message Target { optional EnvironmentGroup environment_group = 6; } +// Used to represent a series of Targets as a series of messages. Preferred +// over repeated fields when the number of targets being serialized may result +// in creating a serialized protocol buffer that is larger than the default +// protocol buffer deserialization limit. +message TargetOrTerminator { + oneof terminator_or_target { + // Is this the last message in the series? + bool is_terminator = 1 [default = false]; + + // The Target encoded in this element. + Target target = 2; + } +} + // Container for all of the blaze query results. message QueryResult { // All of the targets returned by the blaze query. |