zulip/zulip

Prevent races resulting in incorrect search index results for newly sent messages

Aberta

#33.267 aberto em 30 de jan. de 2025

 (16 comentários) (0 reação) (0 responsável)Python (7.339 forks)batch import
area: searchbugdesign reviewhelp wantedpriority: high

Métricas do repositório

Stars
 (19.672 estrelas)
Métricas de merge de PR
 (Mesclagem média 36d 6h) (110 fundiu PRs em 30d)

Description

There's a race when sending messages while looking at a search view, that clients will try to ask the server whether the message matches search terms after hearing about it. If there's any backlog in fts_update_log, the server may return incorrect results.

From the chat.zulip.org thread:

Options include:

  • Checking if any of the messages are in fts_update_log, and if so, processing them.
  • Checking if any of the messages are in fts_update_log, and if so, doing a direct calculation for whether they match.
  • Something else.

This might be somewhat high priority, since attempts to live-update a search view are fairly likely to trigger this race.

Guia do colaborador