gnumed-bugs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-bugs] <bug>: on saving encounter


From: Karsten Hilbert
Subject: Re: [Gnumed-bugs] <bug>: on saving encounter
Date: Fri, 2 Dec 2016 22:54:32 +0100
User-agent: NeoMutt/20161104 (1.7.1)

On Mon, Nov 28, 2016 at 03:51:55PM +0100, Karsten Hilbert wrote:

> thanks for your report.
> 
> You have hit upon an extremely rare situation of PostgreSQL
> making sure GNUmed really sees what it is supposed to see
> (and in this case, simply needs to re-read what it wants to
> see.) This is called Rollover Conflict in:
> 
>       https://wiki.postgresql.org/wiki/SSI
> 
> I'll try to make GNUmed notice this situation and try to
> automætically work around it.

I have committed changes for 1.6.11.

Is this a reproducible problem on your machines ?

Karsten

> On Thu, Nov 24, 2016 at 01:11:07PM +0100, Marc Angermann wrote:
> 
> > user comment  : on saving encounter
> > 
> > client version: 1.6.10
> ...
> > 2016-11-24 13:09:55  ERROR     gm.db 
> > (/usr/share/gnumed/Gnumed/pycommon/gmPG2.py::run_rw_queries() #1688): RW 
> > query failed: [
> >                     SELECT * FROM clin.v_narrative
> >                     WHERE
> >                             pk_narrative = 
> > currval(pg_get_serial_sequence('clin.clin_narrative', 'pk'))]
> > 2016-11-24 13:09:55  ERROR     gm.db 
> > (/usr/share/gnumed/Gnumed/pycommon/gmPG2.py::run_rw_queries() #1692): PG 
> > error code: 40001
> > 2016-11-24 13:09:55  ERROR     gm.db 
> > (/usr/share/gnumed/Gnumed/pycommon/gmPG2.py::run_rw_queries() #1694): PG 
> > error message: ERROR:  could not serialize access due to read/write 
> > dependencies among transactions
> > DETAIL:  Reason code: Canceled on conflict out to pivot 405717, during read.
> > HINT:  The transaction might succeed if retried.
> > 2016-11-24 13:09:55  ERROR     gm.gui 
> > (/usr/share/gnumed/Gnumed/wxpython/gmExceptionHandlingWidgets.py::handle_uncaught_exception_wx()
> >  #215): enabling debug mode
> > 2016-11-24 13:09:55  DEBUG     gm.gui 
> > (/usr/share/gnumed/Gnumed/wxpython/gmExceptionHandlingWidgets.py::handle_uncaught_exception_wx()
> >  #219): unhandled exception caught:
> > Traceback (most recent call last):
> >   File "/usr/share/gnumed/Gnumed/wxpython/gmNarrativeWidgets.py", line 708, 
> > in _on_save_note_button_pressed
> >     gmTools.none_if(self._TCTRL_rfe.GetValue().strip(), u'')
> >   File "/usr/share/gnumed/Gnumed/wxpython/gmNarrativeWidgets.py", line 888, 
> > in save_current_editor
> >     if not page.save(emr = emr, episode_name_candidates = 
> > episode_name_candidates, encounter = encounter):
> >   File "/usr/share/gnumed/Gnumed/wxpython/gmProgressNotesEAWidgets.py", 
> > line 243, in save
> >     encounter_id = encounter
> >   File "/usr/share/gnumed/Gnumed/business/gmClinNarrative.py", line 210, in 
> > create_progress_note
> >     link_obj = link_obj
> >   File "/usr/share/gnumed/Gnumed/business/gmClinNarrative.py", line 278, in 
> > create_narrative_item
> >     rows, idx = gmPG2.run_rw_queries(link_obj = link_obj, queries = 
> > queries, return_data = True, get_col_idx = True)
> >   File "/usr/share/gnumed/Gnumed/pycommon/gmPG2.py", line 1686, in 
> > run_rw_queries
> >     curs.execute(query['cmd'], args)
> >   File "/usr/lib/python2.7/dist-packages/psycopg2/extras.py", line 120, in 
> > execute
> >     return super(DictCursor, self).execute(query, vars)
> > TransactionRollbackError: could not serialize access due to read/write 
> > dependencies among transactions
> > DETAIL:  Reason code: Canceled on conflict out to pivot 405717, during read.
> > HINT:  The transaction might succeed if retried.
> ...
> > 2016-11-24 13:09:55  DEBUG     gm.db 
> > (/usr/share/gnumed/Gnumed/pycommon/gmBackendListener.py::_process_notifications()
> >  #223): #102: Notify(4468, 'gm_table_mod', 
> > 'operation=INSERT::table=clin.clin_narrative::PK name=pk::row 
> > PK=79620::person PK=5524') (first param is PID of sending backend)
> > 2016-11-24 13:09:55  DEBUG     gm.logging 
> > (/usr/share/gnumed/Gnumed/pycommon/gmLog2.py::log_stack_trace() #161): 
> > exception: could not serialize access due to read/write dependencies among 
> > transactions
> > DETAIL:  Reason code: Canceled on conflict out to pivot 405717, during read.
> > HINT:  The transaction might succeed if retried.
> > 
> > 2016-11-24 13:09:55  DEBUG     gm.logging 
> > (/usr/share/gnumed/Gnumed/pycommon/gmLog2.py::log_stack_trace() #162): 
> > type: <class 'psycopg2.extensions.TransactionRollbackError'>
> > 2016-11-24 13:09:55  DEBUG     gm.logging 
> > (/usr/share/gnumed/Gnumed/pycommon/gmLog2.py::log_stack_trace() #163): list 
> > of attributes:
> > 2016-11-24 13:09:55  DEBUG     gm.logging 
> > (/usr/share/gnumed/Gnumed/pycommon/gmLog2.py::log_stack_trace() #165):   
> > args: ('could not serialize access due to read/write dependencies among 
> > transactions\nDETAIL:  Reason code: Canceled on conflict out to pivot 
> > 405717, during read.\nHINT:  The transaction might succeed if retried.\n',)
> > 2016-11-24 13:09:55  DEBUG     gm.logging 
> > (/usr/share/gnumed/Gnumed/pycommon/gmLog2.py::log_stack_trace() #165):   
> > cursor: <cursor object at 0x7f5a9e0a5350; closed: -1>
> > 2016-11-24 13:09:55  DEBUG     gm.logging 
> > (/usr/share/gnumed/Gnumed/pycommon/gmLog2.py::log_stack_trace() #165):   
> > diag: <psycopg2.extensions.Diagnostics object at 0x7f5abf18da08>
> > 2016-11-24 13:09:55  DEBUG     gm.logging 
> > (/usr/share/gnumed/Gnumed/pycommon/gmLog2.py::log_stack_trace() #165):   
> > message: could not serialize access due to read/write dependencies among 
> > transactions
> > DETAIL:  Reason code: Canceled on conflict out to pivot 405717, during read.
> > HINT:  The transaction might succeed if retried.
> > 
> > 2016-11-24 13:09:55  DEBUG     gm.logging 
> > (/usr/share/gnumed/Gnumed/pycommon/gmLog2.py::log_stack_trace() #165):   
> > pgcode: 40001
> > 2016-11-24 13:09:55  DEBUG     gm.logging 
> > (/usr/share/gnumed/Gnumed/pycommon/gmLog2.py::log_stack_trace() #165):   
> > pgerror: ERROR:  could not serialize access due to read/write dependencies 
> > among transactions
> > DETAIL:  Reason code: Canceled on conflict out to pivot 405717, during read.
> > HINT:  The transaction might succeed if retried.
> > 
> > 2016-11-24 13:09:55  DEBUG     gm.logging 
> > (/usr/share/gnumed/Gnumed/pycommon/gmLog2.py::log_stack_trace() #165):   
> > u_pgerror: ERROR:  could not serialize access due to read/write 
> > dependencies among transactions
> > DETAIL:  Reason code: Canceled on conflict out to pivot 405717, during read.
> > HINT:  The transaction might succeed if retried.
> 
> 
> -- 
> GPG key ID E4071346 @ eu.pool.sks-keyservers.net
> E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346
> 

-- 
GPG key ID E4071346 @ eu.pool.sks-keyservers.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346



reply via email to

[Prev in Thread] Current Thread [Next in Thread]