channel: Remove idempotent retry loop.

This was added by commit 7f174213ed, and
appears to have been designed for responses that are *successful* but
falsy. Logically, these should not implicitly represent a failure to
be retried if it were.

Note from tabbott: The background is that this idempotent retry loop
was a hacky workaround for a bug we never understood but saw daily in
production. Especially during server restarts / client reloads,
something would result in 200 responses with no data being seen by the
frontend, despite the Django server not having received/processed the
request. Fortunately, this strange failure mode appears to have
stopped happening in late 2019, so we can delete this hack.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2022-08-18 19:45:06 -07:00
committed by Tim Abbott
parent 4391bc324b
commit fde9b1d366
25 changed files with 6 additions and 80 deletions

View File

@@ -18,7 +18,6 @@ export function mark_all_as_read() {
channel.post({
url: "/json/mark_all_as_read",
idempotent: true,
success: () => {
// After marking all messages as read, we reload the browser.
// This is useful to avoid leaving ourselves deep in the past.
@@ -183,7 +182,6 @@ export function mark_current_list_as_read(options) {
export function mark_stream_as_read(stream_id, cont) {
channel.post({
url: "/json/mark_stream_as_read",
idempotent: true,
data: {stream_id},
success: cont,
});
@@ -192,7 +190,6 @@ export function mark_stream_as_read(stream_id, cont) {
export function mark_topic_as_read(stream_id, topic, cont) {
channel.post({
url: "/json/mark_topic_as_read",
idempotent: true,
data: {stream_id, topic_name: topic},
success: cont,
});