diff options
Diffstat (limited to 'src/namestore/plugin_namestore_postgres.c')
-rw-r--r-- | src/namestore/plugin_namestore_postgres.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/src/namestore/plugin_namestore_postgres.c b/src/namestore/plugin_namestore_postgres.c index 2d4c5d089..510d24496 100644 --- a/src/namestore/plugin_namestore_postgres.c +++ b/src/namestore/plugin_namestore_postgres.c | |||
@@ -153,7 +153,7 @@ database_setup (struct Plugin *plugin) | |||
153 | 2), | 153 | 2), |
154 | GNUNET_PQ_make_prepare ("edit_set", | 154 | GNUNET_PQ_make_prepare ("edit_set", |
155 | "SELECT seq,record_count,record_data,label " | 155 | "SELECT seq,record_count,record_data,label " |
156 | "FROM ns098records WHERE zone_private_key=$1 AND label=$2 FOR UPDATE", | 156 | "FROM ns098records WHERE zone_private_key=$1 AND label=$2 FOR UPDATE NOWAIT", |
157 | 2), | 157 | 2), |
158 | GNUNET_PQ_PREPARED_STATEMENT_END | 158 | GNUNET_PQ_PREPARED_STATEMENT_END |
159 | }; | 159 | }; |
@@ -328,6 +328,8 @@ parse_result_call_iterator (void *cls, | |||
328 | 328 | ||
329 | if (NULL == pc->iter) | 329 | if (NULL == pc->iter) |
330 | return; /* no need to do more work */ | 330 | return; /* no need to do more work */ |
331 | LOG (GNUNET_ERROR_TYPE_DEBUG, | ||
332 | "Got %d results from PQ.\n", num_results); | ||
331 | for (unsigned int i = 0; i < num_results; i++) | 333 | for (unsigned int i = 0; i < num_results; i++) |
332 | { | 334 | { |
333 | uint64_t serial; | 335 | uint64_t serial; |
@@ -412,12 +414,12 @@ parse_result_call_iterator (void *cls, | |||
412 | */ | 414 | */ |
413 | static int | 415 | static int |
414 | lookup_records (void *cls, | 416 | lookup_records (void *cls, |
415 | const struct | 417 | const struct |
416 | GNUNET_IDENTITY_PrivateKey *zone, | 418 | GNUNET_IDENTITY_PrivateKey *zone, |
417 | const char *label, | 419 | const char *label, |
418 | GNUNET_NAMESTORE_RecordIterator iter, | 420 | GNUNET_NAMESTORE_RecordIterator iter, |
419 | void *iter_cls, | 421 | void *iter_cls, |
420 | const char* method) | 422 | const char*method) |
421 | { | 423 | { |
422 | struct Plugin *plugin = cls; | 424 | struct Plugin *plugin = cls; |
423 | struct GNUNET_PQ_QueryParam params[] = { | 425 | struct GNUNET_PQ_QueryParam params[] = { |
@@ -481,11 +483,11 @@ namestore_postgres_lookup_records (void *cls, | |||
481 | */ | 483 | */ |
482 | static int | 484 | static int |
483 | namestore_postgres_edit_records (void *cls, | 485 | namestore_postgres_edit_records (void *cls, |
484 | const struct | 486 | const struct |
485 | GNUNET_IDENTITY_PrivateKey *zone, | 487 | GNUNET_IDENTITY_PrivateKey *zone, |
486 | const char *label, | 488 | const char *label, |
487 | GNUNET_NAMESTORE_RecordIterator iter, | 489 | GNUNET_NAMESTORE_RecordIterator iter, |
488 | void *iter_cls) | 490 | void *iter_cls) |
489 | { | 491 | { |
490 | return lookup_records (cls, zone, label, iter, iter_cls, "edit_set"); | 492 | return lookup_records (cls, zone, label, iter, iter_cls, "edit_set"); |
491 | } | 493 | } |