Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Add schema comments about the destinations and destination_rooms tables. #15247

Merged
merged 3 commits into from
Mar 15, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,21 @@ COMMENT ON TABLE destinations IS
COMMENT ON COLUMN destinations.destination IS 'server name of remote homeserver in question';

COMMENT ON COLUMN destinations.last_successful_stream_ordering IS
'Stream ordering of the most recently successfully sent PDU to this server. See `destination_rooms` for more information about catch-up.';
$$Stream ordering of the most recently successfully sent PDU to this server, sent through normal send (not e.g. backfill).
In Catch-Up Mode, the original PDU persisted by us is represented here, even if we sent a later forward extremity in its stead.
See `destination_rooms` for more information about catch-up.$$;

COMMENT ON COLUMN destinations.retry_last_ts IS
'The last time we tried and failed to reach the remote server, in ms.';
$$The last time we tried and failed to reach the remote server, in ms.
This field is reset to `0` when we succeed in connecting again.$$;

COMMENT ON COLUMN destinations.retry_interval IS
'How long since the last time we tried to reach the remote server before trying again, in ms.';
$$How long, in milliseconds, to wait since the last time we tried to reach the remote server before trying again.
This field is reset to `0` when we succeed in connecting again.$$;

COMMENT ON COLUMN destinations.failure_ts IS
'The first time we tried and failed to reach the remote server, in ms.';
$$The first time we tried and failed to reach the remote server, in ms.
This field is reset to `NULL` when we succeed in connecting again.$$;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Slightly infuritating that it's 0 for some of them but NULL for others!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, maybe there's a reason but I don't know. /shrug




Expand All @@ -43,4 +48,5 @@ COMMENT ON COLUMN destination_rooms.destination IS 'server name of remote homese
COMMENT ON COLUMN destination_rooms.room_id IS 'room ID in question';

COMMENT ON COLUMN destination_rooms.stream_ordering IS
'most recent PDU in this room that needs to be sent to this homeserver';
$$`stream_ordering` of the most recent PDU in this room that needs to be sent (by us) to this homeserver.
This can only be pointing to our own PDU because we are only responsible for sending our own PDUs.$$;