forked from ruby-protobuf/protobuf
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Merge Lookout protobuffy to ruby-protobuf/protobuf v3.6.9 #23
Open
atinm
wants to merge
374
commits into
lookout:master
Choose a base branch
from
atinm:merge-ours-to-master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…n-encode Speed Up Creates & Updates By Memoizing on encode
…tag encoding at runtime
…che_tag_encoded_on_load already loading field on define and should not need to calcualte the …
…ion during required? check; add decoding optimization for enum values in "fetch"
…e_opt compress decoder to single method; only check nil? once on serializat…
If a required bool field is set to `false`, #define_getter returns its default value(=nil) wrongly because of the following code. https://github.com/ruby-protobuf/protobuf/blob/master/lib/protobuf/field/base_field.rb#L230 ```ruby def define_getter --- @values[field.name] || field.default_value ``` This behavor was introduced by [this commit](ruby-protobuf@05aa775) This commit fixes the above issue
Fix #define_getter method
This is a small change, but let's us keep the optimization in base field.
Pull bool getter edge case into BoolField class
Changing values in repeated fields does not clear the memoized encoded value. This means that changes to repated fields after the memoized encoding has been computed will never be encoded. The pattern works for other field types because the memoized value is being cleared in the setter on the message before we call into the field. The field itself is not involved in clearing the memoized value at all. Repeated fields are a different story. If we were completely resetting a repeated field to a new array, the memoized encoding would be correctly cleared, but because the field array we are pushing into doesn't have any concept of a message, let alone the specific message instance the field belongs to, there is no way to clear the memoized encoded message. We need to remove the memoization until we can find a better approach. Fixes ruby-protobuf#304.
…oize_on_encode Remove memoization on encode
Currently, ZMQ assumes that UDP broadcast based service discovery will fit all needs. This change allows a user to create their own service directory and plug it into the ZMQ connector.
Allow user defined service directories
@smathieu Please take a look - as explained in the commit, this is a merge of Lookout work with upstream. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This takes Lookouts changes related to http, logging and stats and merges them to v3.6.9 from upstream. It also updates the spec files to not use deprecated interfaces.