View Issue Details

IDProjectCategoryView StatusLast Update
0007060Talerexchangepublic2021-11-21 14:26
ReporterFlorian Dold Assigned ToChristian Grothoff Resolution deadline
ImplementerReviewer 
Release signed byDeployed by 
VerifierCommunicator 
Data protection authority notification requiredNo  
CSIRT notification requiredNo  
Estimated effort (hours)Actual effort (hours)0 
Fast-trackNo
Work packagenone
PriorityhighSeveritymajorReproducibilityhave not tried
Status closedResolutionno change required 
Product Versiongit (master) 
Target Version0.9Fixed in Version0.9 
Summary0007060: exchange DB connection does not re-run prepared statements on re-connect
DescriptionThe function prepare_statements in plugin_exchangedb_postgres.c is only called from internal_setup, and only if pg->init is set to false.

However, we never set pg->init to true if we lose the DB connection. Worse, GNUNET_PQ_reconnect_if_down doesn't let is know if we reconnected or not.

Ideally, libgnunetpq would track whether prepared statements have been run or not.

The problem with that approach is that currently libgnunetpq eagerly executes prepared statements, even though tables might not be created yet, which causes these statements to fail. But I don't understand why this matters, since we only need to do this for DB connection that normally access the DB, and not for the special administrative DB transactions.
TagsNo tags attached.

Required notifications

Address or linkRemarkAdded byNotifiedActions

Activities

Christian Grothoff

2021-11-21 14:26

manager   ~0018516

Bug was based on a misunderstanding by Florian on the GNUNET_PQ_prepare_statements() logic which does already ensure reinitialization of all prepared statements on reconnect.

Issue History

Date ModifiedUsernameFieldChange
2021-11-01 14:51Florian DoldNew Issue
2021-11-01 14:51Florian DoldStatusnew => assigned
2021-11-01 14:51Florian DoldAssigned To => Christian Grothoff
2021-11-21 14:26Christian GrothoffStatusassigned => informing
2021-11-21 14:26Christian GrothoffResolutionopen => no change required
2021-11-21 14:26Christian GrothoffFixed in Version => 0.9
2021-11-21 14:26Christian GrothoffNote Added: 0018516
2021-11-21 14:26Christian GrothoffTarget Version0.9.1 => 0.9
2021-11-21 14:26Christian GrothoffStatusinforming => closed