File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,8 @@ def process_entities(self):
7272 # If the addition of this entity will make the binary token grow too large,
7373 # send the buffer now.
7474 # TODO how much of this can be made uniform w/ relations and moved to Querybuffer?
75- if self .binary_size + row_binary_len > self .config .max_token_size :
75+ added_size = self .binary_size + row_binary_len
76+ if added_size >= self .config .max_token_size or self .query_buffer .buffer_size + added_size >= self .config .max_buffer_size :
7677 self .query_buffer .labels .append (self .to_binary ())
7778 self .query_buffer .send_buffer ()
7879 self .reset_partial_binary ()
Original file line number Diff line number Diff line change @@ -74,7 +74,8 @@ def process_entities(self):
7474 row_binary_len = len (row_binary )
7575 # If the addition of this entity will make the binary token grow too large,
7676 # send the buffer now.
77- if self .binary_size + row_binary_len > self .config .max_token_size :
77+ added_size = self .binary_size + row_binary_len
78+ if added_size >= self .config .max_token_size or self .query_buffer .buffer_size + added_size >= self .config .max_buffer_size :
7879 self .query_buffer .reltypes .append (self .to_binary ())
7980 self .query_buffer .send_buffer ()
8081 self .reset_partial_binary ()
You can’t perform that action at this time.
0 commit comments