mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-01 05:42:46 +00:00
Cleanup syncapi topology logic (#1035)
* Cleanup syncapi topology logic * Variable renaming * comments
This commit is contained in:
parent
3cb04e8004
commit
7ca230e931
9 changed files with 67 additions and 154 deletions
|
@ -119,8 +119,11 @@ func (t *TopologyToken) Decrement() {
|
|||
depth := t.Positions[0]
|
||||
pduPos := t.Positions[1]
|
||||
if depth-1 <= 0 {
|
||||
// nothing can be lower than this
|
||||
depth = 1
|
||||
} else {
|
||||
// this assumes that we will never have 1000 events all with the same
|
||||
// depth. TODO: work out what the right PDU position is to use, probably needs a db hit.
|
||||
depth--
|
||||
pduPos += 1000
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue