Merge pull request #1735 from ajbeamon/fix-load-balanced-reply-error-initialization
LoadBalancedReplies were sending uninitialized versions of their subc…
This commit is contained in:
commit
55cf429cc1
|
@ -401,7 +401,7 @@ private:
|
|||
public:
|
||||
bool orEqual; // (or equal to key, if this is true)
|
||||
int offset; // and then move forward this many items (or backward if negative)
|
||||
KeySelectorRef() {}
|
||||
KeySelectorRef() : orEqual(false), offset(0) {}
|
||||
KeySelectorRef( const KeyRef& key, bool orEqual, int offset ) : orEqual(orEqual), offset(offset) {
|
||||
setKey(key);
|
||||
}
|
||||
|
|
|
@ -163,6 +163,8 @@ struct GetKeyValuesReply : public LoadBalancedReply {
|
|||
Version version; // useful when latestVersion was requested
|
||||
bool more;
|
||||
|
||||
GetKeyValuesReply() : version(invalidVersion), more(false) {}
|
||||
|
||||
template <class Ar>
|
||||
void serialize( Ar& ar ) {
|
||||
serializer(ar, *(LoadBalancedReply*)this, data, version, more, arena);
|
||||
|
|
|
@ -65,6 +65,7 @@ struct ModelHolder : NonCopyable, public ReferenceCounted<ModelHolder> {
|
|||
}
|
||||
};
|
||||
|
||||
// Subclasses must initialize all members in their default constructors
|
||||
struct LoadBalancedReply {
|
||||
double penalty;
|
||||
Optional<Error> error;
|
||||
|
|
Loading…
Reference in New Issue