mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-09 07:53:11 -06:00
Fix whitespace and more comments
This commit is contained in:
parent
5b2e8db5b6
commit
5874ac5898
|
|
@ -27,7 +27,7 @@ func processRoomEvent(db RoomEventDatabase, input api.InputRoomEvent) error {
|
||||||
if input.Kind == api.KindOutlier {
|
if input.Kind == api.KindOutlier {
|
||||||
// For outliers we can stop after we've stored the event itself as it
|
// For outliers we can stop after we've stored the event itself as it
|
||||||
// doesn't have any associated state to store and we don't need to
|
// doesn't have any associated state to store and we don't need to
|
||||||
// notify anyone it.
|
// notify anyone about it.
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -65,13 +65,13 @@ func (s *statements) preparePartitionOffsets(db *sql.DB) (err error) {
|
||||||
const partitionOffsetsSchema = `
|
const partitionOffsetsSchema = `
|
||||||
-- The offsets that the server has processed up to.
|
-- The offsets that the server has processed up to.
|
||||||
CREATE TABLE IF NOT EXISTS partition_offsets (
|
CREATE TABLE IF NOT EXISTS partition_offsets (
|
||||||
-- The name of the topic.
|
-- The name of the topic.
|
||||||
topic TEXT NOT NULL,
|
topic TEXT NOT NULL,
|
||||||
-- The 32-bit partition ID
|
-- The 32-bit partition ID
|
||||||
partition INTEGER NOT NULL,
|
partition INTEGER NOT NULL,
|
||||||
-- The 64-bit offset.
|
-- The 64-bit offset.
|
||||||
partition_offset BIGINT NOT NULL,
|
partition_offset BIGINT NOT NULL,
|
||||||
CONSTRAINT topic_partition_unique UNIQUE (topic, partition)
|
CONSTRAINT topic_partition_unique UNIQUE (topic, partition)
|
||||||
);
|
);
|
||||||
`
|
`
|
||||||
|
|
||||||
|
|
@ -292,11 +292,13 @@ CREATE TABLE IF NOT EXISTS events (
|
||||||
-- Local numeric ID for the event.
|
-- Local numeric ID for the event.
|
||||||
event_nid BIGINT PRIMARY KEY DEFAULT nextval('event_nid_seq'),
|
event_nid BIGINT PRIMARY KEY DEFAULT nextval('event_nid_seq'),
|
||||||
-- Local numeric ID for the room the event is in.
|
-- Local numeric ID for the room the event is in.
|
||||||
|
-- This is never 0.
|
||||||
room_nid BIGINT NOT NULL,
|
room_nid BIGINT NOT NULL,
|
||||||
-- Local numeric ID for the type of the event.
|
-- Local numeric ID for the type of the event.
|
||||||
|
-- This is never 0.
|
||||||
event_type_nid BIGINT NOT NULL,
|
event_type_nid BIGINT NOT NULL,
|
||||||
-- Local numeric ID for the state_key of the event
|
-- Local numeric ID for the state_key of the event
|
||||||
-- This is 0 if the event is not a state event.
|
-- This is 0 if the event is not a state event.
|
||||||
event_state_key_nid BIGINT NOT NULL,
|
event_state_key_nid BIGINT NOT NULL,
|
||||||
-- The textual event id.
|
-- The textual event id.
|
||||||
-- Used to lookup the numeric ID when processing requests.
|
-- Used to lookup the numeric ID when processing requests.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue