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

Leftover duplicates from group duplicates #3295

Closed
thegcat opened this issue May 27, 2018 · 1 comment
Closed

Leftover duplicates from group duplicates #3295

thegcat opened this issue May 27, 2018 · 1 comment
Labels
z-minor (Deprecated Label) z-p2 (Deprecated Label)

Comments

@thegcat
Copy link
Contributor

thegcat commented May 27, 2018

Description

One of our groups/communities does not correctly yet, probably related to #3128/#3129 and #2633. Following errors in the logs (names of the user and group redacted):

May 27 12:06:57 kif-matrix python[26413]: 2018-05-27 12:06:57,796 - synapse.groups.attestations - 193 - ERROR - - Error renewing attestation of u'@theuser' in u'+thegroup'
May 27 12:06:57 kif-matrix python[26413]: Traceback (most recent call last):
May 27 12:06:57 kif-matrix python[26413]:   File "/usr/lib/python2.7/dist-packages/synapse/groups/attestations.py", line 189, in _renew_attestation
May 27 12:06:57 kif-matrix python[26413]:     group_id, user_id, attestation
May 27 12:06:57 kif-matrix python[26413]:   File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1297, in _inlineCallbacks
May 27 12:06:57 kif-matrix python[26413]:     result = result.throwExceptionIntoGenerator(g)
May 27 12:06:57 kif-matrix python[26413]:   File "/usr/lib/python2.7/dist-packages/twisted/python/failure.py", line 389, in throwExceptionIntoGenerator
May 27 12:06:57 kif-matrix python[26413]:     return g.throw(self.type, self.value, self.tb)
May 27 12:06:57 kif-matrix python[26413]:   File "/usr/lib/python2.7/dist-packages/synapse/storage/_base.py", line 320, in runInteraction
May 27 12:06:57 kif-matrix python[26413]:     result = yield self.runWithConnection(inner_func, *args, **kwargs)
May 27 12:06:57 kif-matrix python[26413]:   File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1297, in _inlineCallbacks
May 27 12:06:57 kif-matrix python[26413]:     result = result.throwExceptionIntoGenerator(g)
May 27 12:06:57 kif-matrix python[26413]:   File "/usr/lib/python2.7/dist-packages/twisted/python/failure.py", line 389, in throwExceptionIntoGenerator
May 27 12:06:57 kif-matrix python[26413]:     return g.throw(self.type, self.value, self.tb)
May 27 12:06:57 kif-matrix python[26413]:   File "/usr/lib/python2.7/dist-packages/synapse/storage/_base.py", line 365, in runWithConnection
May 27 12:06:57 kif-matrix python[26413]:     inner_func, *args, **kwargs
May 27 12:06:57 kif-matrix python[26413]:   File "/usr/lib/python2.7/dist-packages/twisted/python/threadpool.py", line 246, in inContext
May 27 12:06:57 kif-matrix python[26413]:     result = inContext.theWork()
May 27 12:06:57 kif-matrix python[26413]:   File "/usr/lib/python2.7/dist-packages/twisted/python/threadpool.py", line 262, in <lambda>
May 27 12:06:57 kif-matrix python[26413]:     inContext.theWork = lambda: context.call(ctx, func, *args, **kw)
May 27 12:06:57 kif-matrix python[26413]:   File "/usr/lib/python2.7/dist-packages/twisted/python/context.py", line 118, in callWithContext
May 27 12:06:57 kif-matrix python[26413]:     return self.currentContext().callWithContext(ctx, func, *args, **kw)
May 27 12:06:57 kif-matrix python[26413]:   File "/usr/lib/python2.7/dist-packages/twisted/python/context.py", line 81, in callWithContext
May 27 12:06:57 kif-matrix python[26413]:     return func(*args,**kw)
May 27 12:06:57 kif-matrix python[26413]:   File "/usr/lib/python2.7/dist-packages/twisted/enterprise/adbapi.py", line 307, in _runWithConnection
May 27 12:06:57 kif-matrix python[26413]:     compat.reraise(excValue, excTraceback)
May 27 12:06:57 kif-matrix python[26413]:   File "/usr/lib/python2.7/dist-packages/twisted/enterprise/adbapi.py", line 298, in _runWithConnection
May 27 12:06:57 kif-matrix python[26413]:     result = func(conn, *args, **kw)
May 27 12:06:57 kif-matrix python[26413]:   File "/usr/lib/python2.7/dist-packages/synapse/storage/_base.py", line 361, in inner_func
May 27 12:06:57 kif-matrix python[26413]:     return func(conn, *args, **kwargs)
May 27 12:06:57 kif-matrix python[26413]:   File "/usr/lib/python2.7/dist-packages/synapse/storage/_base.py", line 316, in inner_func
May 27 12:06:57 kif-matrix python[26413]:     func, *args, **kwargs
May 27 12:06:57 kif-matrix python[26413]:   File "/usr/lib/python2.7/dist-packages/synapse/storage/_base.py", line 241, in _new_transaction
May 27 12:06:57 kif-matrix python[26413]:     r = func(txn, *args, **kwargs)
May 27 12:06:57 kif-matrix python[26413]:   File "/usr/lib/python2.7/dist-packages/synapse/storage/_base.py", line 842, in _simple_update_one_txn
May 27 12:06:57 kif-matrix python[26413]:     raise StoreError(500, "More than one row matched")
May 27 12:06:57 kif-matrix python[26413]: StoreError: 500: More than one row matched

I can also see that this user has 2 entries in both groups_attestations_remote and groups_attestations_renewals, one valid until 1526837230194 and the other until 1526804886876.

Should I delete the older attestation, the newer attestation or both? In both tables or only one? I think this should also be treated in a migration similar to #3129.

Version information

  • Homeserver: Other home server
  • Version: Synapse/0.30.0
  • Install method: apt package
  • Platform: Ubuntu 17.10 Container
@neilisfragile neilisfragile added z-p2 (Deprecated Label) z-minor (Deprecated Label) labels Jun 4, 2018
@richvdh
Copy link
Member

richvdh commented Feb 27, 2019

I'm going to assume that this problem is no longer relevant.

@richvdh richvdh closed this as completed Feb 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
z-minor (Deprecated Label) z-p2 (Deprecated Label)
Projects
None yet
Development

No branches or pull requests

3 participants