1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-01 19:22:42 +01:00
phorge-phorge/src/applications
epriestley 0a3093ef9c Fix an issue where paginating notifications could fail a GROUP BY test
Summary:
Ref T13623. When paginating notifications, we may currently construct a query which:

  - loads from non-unique rows; and
  - returns multiple results.

In particular, `chronologicalKey` isn't unique across the whole table (only for a given viewer). We can get away with this because no user-facing view of notifications is truly "every notification for every viewer" today.

One fix would be to implicitly force the paging query to include `withUserPHIDs(viewerPHID)`, but puruse a slightly more general fix:

  - Load only unique stories.
  - Explictly limit the pagination subquery to one result.

Test Plan:
  - Set page size to 1, inserted duplicate notifications of all stories for another user, clicked "Next", got the GROUP BY error.
  - Applied the "only load unique stories" part of the change, got a "expected one row" error instead.
  - Applied the "limit 1" part of the change, got a second page of notifications.

Maniphest Tasks: T13623

Differential Revision: https://secure.phabricator.com/D21577
2021-02-26 15:11:25 -08:00
..
almanac Remove "AlmanacPropertyInterface" from "AlmanacNamespace" 2021-02-03 15:20:26 -08:00
aphlict Reduce the verbosity of the "Aphlict" log 2020-04-14 13:24:44 -07:00
arcanist/conduit
audit Rename "IMPORTED_CLOSEABLE" to "IMPORTED_PERMANENT" to clarify the meaning of the flag 2021-01-22 19:51:38 -08:00
auth Remove Facebook OAuth dependency on "security_settings" property 2021-02-19 10:27:42 -08:00
badges Convert simple query subclasses to use internal cursors 2019-03-19 13:00:27 -07:00
base Remove "final" from "private" methods in Phabricator 2021-02-03 14:13:29 -08:00
cache Straighten out replication/cache behavior in "bin/storage dump" 2019-08-28 08:25:40 -07:00
calendar Merge a small amount of remaining "libphutil/" code with Phabricator, break libphutil dependency 2020-02-12 15:17:36 -08:00
celerity Give selected inline comments are more obvious selected state 2020-05-14 14:35:55 -07:00
chatlog Replace "getRequestURI()->setQueryParams(array())" with "getPath()" 2019-02-12 14:43:33 -08:00
conduit Update "arc call-conduit" instructions in Conduit API console for required "--" 2020-10-19 12:02:30 -07:00
config Support an SSH error log 2021-02-26 14:54:54 -08:00
conpherence Improve Conpherence behavior for logged out users. 2019-04-02 14:03:08 -07:00
console When a Paste has a useful alternative rendering in Files, provide a hint 2020-05-01 09:09:42 -07:00
countdown Add a test to verify that all routing maps are plausibly valid, and remove some dead routes 2020-02-14 18:06:24 -08:00
daemon Remove ancient "phd.trace" and "phd.verbose" configuration options 2020-07-23 12:31:32 -07:00
dashboard Move existing "Console" interfaces away from "setFixed(...)" on "TwoColumnView" 2020-02-04 06:52:23 -08:00
differential When mapping phantom comments across changes, correct an off-by-one issue 2021-02-23 11:08:11 -08:00
diffusion Add an internal service ref panel to repository "Storage" information 2021-02-25 12:29:17 -08:00
diviner Refine handling of "@task" attributes in Diviner 2020-04-06 11:51:33 -07:00
doorkeeper Remove all readers and all nontrivial writers for "accountType" and "accountDomain" on "ExternalAccount" 2020-02-22 17:48:46 -08:00
draft/storage Save drafts for inline comments currently being edited 2020-05-04 13:19:42 -07:00
drydock Add missing indexes to DrydockRepositoryOperation 2020-09-17 12:10:00 -07:00
fact Fix additional "xprintf()"-class static parameter lint errors 2020-09-08 11:45:48 -07:00
favorites Make "Favorites" work more like other customizable menus 2019-04-09 13:59:35 -07:00
feed Support export of feed transactions to CSV/Excel/etc 2019-05-21 12:47:46 -07:00
files Expose the "file attached to object" and "object attached to file" edges via "edge.search" 2020-10-16 13:45:35 -07:00
flag Add a "Remove flag" action to Herald 2019-09-09 13:15:52 -07:00
fund Update a straggling "getAuthorities()" call in Fund 2019-09-04 07:15:20 -07:00
guides Remove legacy "DashboardInstall" table 2019-04-14 10:27:52 -07:00
harbormaster Add more useful PHIDs to Harbormaster build variables 2021-02-18 13:37:54 -08:00
help Tokenize external editor links so they can be safely materialized on the client 2020-04-19 09:02:49 -07:00
herald Provide a more structured result log for Herald rules 2021-02-19 11:16:22 -08:00
home Make "Favorites" work more like other customizable menus 2019-04-09 13:59:35 -07:00
legalpad Don't present users with Herald fields/actions for uninstalled applications, unless the rule already uses them 2019-09-12 14:33:28 -07:00
lipsum Add "--force" and "--quickly" flags to bin/lipsum 2017-02-27 09:09:41 -08:00
macro Improve timeline rendering for old macros 2019-04-18 18:25:17 -07:00
maniphest Render user hovercards with context information about their ability to see the context object 2021-02-13 13:37:37 -08:00
meta Fix a straggling callsite to "renderApplicationPolicy()" 2019-09-12 16:26:57 -07:00
metamta Add a missing "GROUP BY" to MailQuery when querying for multiple recipients 2020-10-30 13:02:22 -07:00
multimeter Fix a PhutilURI issue in Multimeter 2019-02-17 17:39:34 -08:00
notification Fix an issue where paginating notifications could fail a GROUP BY test 2021-02-26 15:11:25 -08:00
nuance Fix additional "xprintf()"-class static parameter lint errors 2020-09-08 11:45:48 -07:00
oauthserver Lightly modernize OAuth server application view pages 2019-07-02 05:15:37 -07:00
owners Remove "PhabricatorAuditListView" 2020-08-12 09:00:02 -07:00
packages Change baseURI for Packages to avoid 404 2020-11-19 21:48:33 +00:00
passphrase Fix an issue where passphrase-protected private keys were stored without discarding passphrases 2020-05-13 08:14:37 -07:00
paste When creating a File storage object for a Paste, try to give it the same name as the Paste 2020-05-01 09:10:31 -07:00
people Render user hovercards with context information about their ability to see the context object 2021-02-13 13:37:37 -08:00
phame Add a test to verify that all routing maps are plausibly valid, and remove some dead routes 2020-02-14 18:06:24 -08:00
phid When a reviewer can't see a revision, show it clearly in the reviewer list 2021-02-13 13:37:37 -08:00
phlux Convert simple query subclasses to use internal cursors 2019-03-19 13:00:27 -07:00
pholio Make "Quote" work properly in Pholio 2020-08-10 13:40:25 -07:00
phortune In Phortune accounts, prevent self-removal more narrowly 2020-05-26 07:09:42 -07:00
phpast Update phpast for new UI 2016-04-05 13:52:59 -07:00
phragment Fix additional "xprintf()"-class static parameter lint errors 2020-09-08 11:45:48 -07:00
phrequent Convert simple query subclasses to use internal cursors 2019-03-19 13:00:27 -07:00
phriction When printing timestamps on paper: use an absolute, context-free date format 2020-09-04 16:36:34 -07:00
phurl Convert simple query subclasses to use internal cursors 2019-03-19 13:00:27 -07:00
policy When a subscriber can't see an object, clearly show that they're missing the permission in the curtain UI 2021-02-13 13:37:36 -08:00
ponder Fix a missing pht() in Ponder 2019-04-12 12:18:56 -07:00
project Execute project membership materialization as "SELECT" + "INSERT", not "INSERT ... SELECT" 2021-01-28 09:04:44 -08:00
releeph Convert simple query subclasses to use internal cursors 2019-03-19 13:00:27 -07:00
remarkup Recognize self-URI links to Diffusion files and give them special rendering behavior 2019-05-21 13:07:37 -07:00
repository Correct behavior of "writable" Almanac service binding for repository services 2021-02-25 12:29:17 -08:00
search When documents are indexed, record the indexer version (versus the object version) and index epoch 2021-02-16 16:09:31 -08:00
settings Add "idea://" to the upstream editor whitelist 2020-05-01 12:56:35 -07:00
slowvote Deprecate ancient "slowvote.info" API method 2019-07-31 11:28:08 -07:00
spaces Remove "Editable By" description fields in Passphrase, Phame, and Spaces 2019-09-12 09:36:50 -07:00
subscriptions When a subscriber can't see an object, clearly show that they're missing the permission in the curtain UI 2021-02-13 13:37:36 -08:00
support/application
system Restructure Hovercards to support more context information 2021-02-13 13:37:36 -08:00
tokens Allow tokens to be awarded to MFA-required objects 2018-12-28 00:14:48 -08:00
transactions Provide hovercards for generic edge stories, and include more message information in commit hovercards 2021-02-25 10:29:58 -08:00
typeahead Make Portals indexable with Ferret 2019-04-10 13:33:54 -07:00
uiexample Reduce the cost of generating default user profile images 2018-03-01 16:53:17 -08:00
xhprof Allow XHProf profiles to be drag-and-dropped to upload them 2017-02-23 11:16:19 -08:00