core: Fix Postgres messagesNewerThan wrong buffer #276
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.
In short
select_messagesNewerThan
statement limiting to the wrong buffer$1
forbufferid
in innerSELECT
with the actual buffer ID,$2
lastmsgid
limit, resolving missing messages with unread fetchingApologies for missing this in pull request 274. There, I tested that loading backlog worked for new setups. I did not test on a larger data-set.
Note: This does not fix the client-side issue of generating the invalid IDs. That still needs fixed in a follow-up.
Example
Before
Quassel with unread fetching misses new messages, e.g.
Test
message does not show, Freenode does not show activity in status bufferAfter
Unread fetching grabs the new messages, e.g.
Test
message does show, Freenode shows activity in status bufferSide-by-side (production)
Quasseldroid uses fixed fetching, Quassel desktop uses unread fetching, both on the
git master
core. Notice the#sandstorm
channel and the Freenode status buffer