modifications on batch test again

This commit is contained in:
Joseph 2023-01-05 07:55:07 -05:00
parent 7933815ce6
commit d805c54052
No known key found for this signature in database
GPG Key ID: E709789D3076B5CC
5 changed files with 24 additions and 24 deletions

View File

@ -178,13 +178,13 @@ BEGIN
END IF;
END IF;
END IF;
IF transaction_duplicate
/* IF transaction_duplicate
OR transaction_duplicate2
THEN
CLOSE curs_transaction_exist;
ROLLBACK;
RETURN;
END IF;
END IF;*/
CLOSE curs_transaction_exist;
RETURN;
END $$;

View File

@ -244,7 +244,7 @@ BEGIN
k=k+1;
END LOOP;
IF transaction_duplicate
/*IF transaction_duplicate
OR transaction_duplicate2
OR transaction_duplicate3
OR transaction_duplicate4
@ -253,7 +253,7 @@ BEGIN
ROLLBACK;
CLOSE curs_transaction_exist;
RETURN;
END IF;
END IF;*/
CLOSE curs_transaction_exist;
RETURN;

View File

@ -238,7 +238,6 @@ BEGIN
RETURNING reserve_uuid,reserve_pub)
SELECT * FROM reserve_changes;
WHILE k < 8 LOOP
FETCH FROM curs_reserve_existed INTO i;
@ -410,7 +409,7 @@ BEGIN
END IF;
k=k+1;
END LOOP;
IF transaction_duplicate
/* IF transaction_duplicate
OR transaction_duplicate2
OR transaction_duplicate3
OR transaction_duplicate4
@ -422,7 +421,7 @@ BEGIN
CLOSE curs_transaction_existed;
ROLLBACK;
RETURN;
END IF;
END IF;*/
CLOSE curs_transaction_existed;
RETURN;
END $$;

View File

@ -116,7 +116,7 @@ insert1(struct PostgresClosure *pg,
return qs2;
}
GNUNET_assert (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS != qs2);
if ((conflict[0]) && transaction_duplicate[0])
if ((! conflict[0]) && transaction_duplicate[0])
{
GNUNET_break (0);
TEH_PG_rollback (pg);
@ -221,8 +221,8 @@ insert2 (struct PostgresClosure *pg,
: GNUNET_DB_STATUS_SUCCESS_ONE_RESULT;*/
if (
((conflict[0]) && (transaction_duplicate[0]))
||((conflict[1]) && (transaction_duplicate[1]))
((! conflict[0]) && (transaction_duplicate[0]))
||((! conflict[1]) && (transaction_duplicate[1]))
)
{
GNUNET_break (0);
@ -366,10 +366,10 @@ insert4 (struct PostgresClosure *pg,
GNUNET_assert (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS != qs3);
if (
((conflict[0]) && (transaction_duplicate[0]))
||((conflict[1]) && (transaction_duplicate[1]))
||((conflict[2]) && (transaction_duplicate[2]))
||((conflict[3]) && (transaction_duplicate[3]))
((! conflict[0]) && (transaction_duplicate[0]))
||((! conflict[1]) && (transaction_duplicate[1]))
||((! conflict[2]) && (transaction_duplicate[2]))
||((! conflict[3]) && (transaction_duplicate[3]))
)
{
GNUNET_break (0);
@ -600,14 +600,14 @@ insert8 (struct PostgresClosure *pg,
: GNUNET_DB_STATUS_SUCCESS_ONE_RESULT;*/
if (
((conflict[0]) && (transaction_duplicate[0]))
||((conflict[1]) && (transaction_duplicate[1]))
||((conflict[2]) && (transaction_duplicate[2]))
||((conflict[3]) && (transaction_duplicate[3]))
||((conflict[4]) && (transaction_duplicate[4]))
||((conflict[5]) && (transaction_duplicate[5]))
||((conflict[6]) && (transaction_duplicate[6]))
||((conflict[7]) && (transaction_duplicate[7]))
((! conflict[0]) && (transaction_duplicate[0]))
||((! conflict[1]) && (transaction_duplicate[1]))
||((! conflict[2]) && (transaction_duplicate[2]))
||((! conflict[3]) && (transaction_duplicate[3]))
||((! conflict[4]) && (transaction_duplicate[4]))
||((! conflict[5]) && (transaction_duplicate[5]))
||((! conflict[6]) && (transaction_duplicate[6]))
||((! conflict[7]) && (transaction_duplicate[7]))
)
{
GNUNET_break (0);
@ -710,6 +710,7 @@ TEH_PG_batch2_reserves_in_insert (void *cls,
return qs1;
}
// fprintf(stdout, "%ld %ld %ld %ld %ld %ld %ld %ld\n", reserve_uuid[i], reserve_uuid[i+1], reserve_uuid[i+2], reserve_uuid[i+3], reserve_uuid[i+4], reserve_uuid[i+5], reserve_uuid[i+6],reserve_uuid[]);
// fprintf(stdout, "%d %d %d %d %d %d %d %d\n", conflicts[i], conflicts[i+1], conflicts[i+2], conflicts[i+3], conflicts[i+4], conflicts[i+5], conflicts[i+6],conflicts[]);
need_update |= conflicts[i];
need_update |= conflicts[i+1];
need_update |= conflicts[i+2];
@ -790,7 +791,7 @@ TEH_PG_batch2_reserves_in_insert (void *cls,
need_update |= conflicts[i+1];
t_duplicate |= transaction_duplicate[i];
t_duplicate |= transaction_duplicate[i+1];
// fprintf(stdout, "t : %d %d", transaction_duplicate[i], transaction_duplicate[i+1]);
i += 2;
break;
case 1:

View File

@ -107,7 +107,7 @@ run (void *cls)
const char *sndr = "payto://x-taler-bank/localhost:8080/1";
struct TALER_Amount value;
unsigned int batch_size = batches[i];
unsigned int iterations = 16;//1024*10;
unsigned int iterations = 200;//1024*10;
struct TALER_ReservePublicKeyP reserve_pubs[iterations];
struct GNUNET_TIME_Absolute now;
struct GNUNET_TIME_Timestamp ts;