[Bucardo-general] end_syncrun has too many rows

Michelle Sullivan michelle at sorbs.net
Wed Oct 16 08:46:09 UTC 2013


Greg Sabino Mullane wrote:
> On Tue, Oct 15, 2013 at 11:42:50AM +0200, Michelle Sullivan wrote:
>   
>> (31523) [Tue Oct 15 09:41:26 2013] KID Expected one row from
>> end_syncrun, but got 4
>>     
>
> Yes, that should never happen. Not sure what is causing it yet.
>
>   
Well this would probably be it:

bucardo=# select * from syncrun where ended is null;
    sync    | truncates | deletes | inserts | conflicts |           
started            | ended | lastgood | lastbad | lastempty | details
|               status              
------------+-----------+---------+---------+-----------+-------------------------------+-------+----------+---------+-----------+---------+------------------------------------
 sessions   |         0 |       0 |       0 |         0 | 2013-10-16
08:42:23.115074+00 |       | f        | f       | f         |         |
Begin txn (KID 18959)
 sessionsdb |         0 |       0 |       0 |         0 | 2013-10-16
08:42:22.10214+00  |       | f        | f       | f         |         |
Sync public.sessions (KID 18951)
 sorbsmm    |         0 |    2058 |   10833 |         0 | 2013-10-16
08:37:31.873232+00 |       | f        | f       | f         |         |
Sync public.timestamps (KID 16415)
 sorbsmm    |         0 |    6300 |   33216 |         0 | 2013-10-16
08:27:53.289089+00 |       | f        | f       | f         |         |
Sync public.timestamps (KID 16415)
 sorbsmm    |         0 |    2409 |   12609 |         0 | 2013-10-16
08:36:54.313334+00 |       | f        | f       | f         |         |
Sync public.timestamps (KID 16415)
 sorbsmm    |         0 |    1122 |    6456 |         0 | 2013-10-16
08:40:01.902355+00 |       | f        | f       | f         |         |
Sync public.timestamps (KID 16415)
 sorbsmm    |         0 |    1467 |    7845 |         0 | 2013-10-16
08:38:48.340352+00 |       | f        | f       | f         |         |
Sync public.timestamps (KID 16415)
 sorbsmm    |         0 |   10113 |   61818 |         0 | 2013-10-16
08:19:57.755043+00 |       | f        | f       | f         |         |
Sync public.timestamps (KID 16415)
 sorbsmm    |         0 |    7020 |   36942 |         0 | 2013-10-16
08:26:41.602575+00 |       | f        | f       | f         |         |
Sync public.timestamps (KID 16415)
 sorbsmm    |         0 |       0 |       0 |         0 | 2013-10-16
08:41:48.716765+00 |       | f        | f       | f         |         |
Sync public.timestamps (KID 16415)
 sorbsmm    |         0 |     510 |    3264 |         0 | 2013-10-16
08:41:03.484581+00 |       | f        | f       | f         |         |
Sync public.timestamps (KID 16415)
 sorbsmm    |         0 |    1782 |    9363 |         0 | 2013-10-16
08:38:11.501797+00 |       | f        | f       | f         |         |
Sync public.timestamps (KID 16415)
 sorbsmm    |         0 |   12522 |   73857 |         0 | 2013-10-16
08:14:00.629088+00 |       | f        | f       | f         |         |
Sync public.timestamps (KID 16415)
 sorbsmm    |         0 |   11019 |   66264 |         0 | 2013-10-16
08:17:15.78518+00  |       | f        | f       | f         |         |
Sync public.timestamps (KID 16415)
 sorbsmm    |         0 |   13938 |   80988 |         0 | 2013-10-16
08:11:27.207294+00 |       | f        | f       | f         |         |
Sync public.timestamps (KID 16415)
 sorbsmm    |         0 |    5736 |   30405 |         0 | 2013-10-16
08:29:59.448164+00 |       | f        | f       | f         |         |
Sync public.timestamps (KID 16415)
 sorbsmm    |         0 |    6030 |   31920 |         0 | 2013-10-16
08:28:31.016543+00 |       | f        | f       | f         |         |
Sync public.timestamps (KID 16415)
 sorbsmm    |         0 |   15495 |   88161 |         0 | 2013-10-16
08:08:36.700863+00 |       | f        | f       | f         |         |
Sync public.timestamps (KID 16415)
 sorbsmm    |         0 |   17235 |   97026 |         0 | 2013-10-16
08:04:21.43337+00  |       | f        | f       | f         |         |
Sync public.timestamps (KID 16415)
 sorbsmmseq |         0 |       0 |       0 |         0 | 2013-10-16
08:42:14.190085+00 |       | f        | f       | f         |         |
Begin txn (KID 20042)
(20 rows)


The sorbsmm sync aborts (eg with the accounts2email async failed error)
and leaves the sync run 'ended' as null.

You should probably add a little cleanup on restart of a kid (as the
cleanup happens when the MCP is restarted) to mark the open sync as  'bad'

Michelle

-- 
Michelle Sullivan
http://www.mhix.org/



More information about the Bucardo-general mailing list