Skip to content
Snippets Groups Projects
Unverified Commit 695240d3 authored by Erik Johnston's avatar Erik Johnston Committed by GitHub
Browse files

Fix DB query on startup for negative streams. (#8447)

For negative streams we have to negate the internal stream ID before
querying the DB.

The effect of this bug was to query far too many rows, slowing start up
time, but we would correctly filter the results afterwards so there was
no ill effect.
parent 34ff8da8
No related branches found
No related tags found
No related merge requests found
Fix DB query on startup for negative streams which caused long start up times. Introduced in #8374.
......@@ -341,7 +341,7 @@ class MultiWriterIdGenerator:
"cmp": "<=" if self._positive else ">=",
}
sql = self._db.engine.convert_param_style(sql)
cur.execute(sql, (min_stream_id,))
cur.execute(sql, (min_stream_id * self._return_factor,))
self._persisted_upto_position = min_stream_id
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment