From 47ed9921b6c9fe49d4aadf244f7df1ce4d05a5b3 Mon Sep 17 00:00:00 2001 From: Andre Lorbach Date: Thu, 18 Aug 2011 09:36:59 +0200 Subject: bugfix: fixed incorrect state handling for Discard Action (transactions) --- runtime/queue.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'runtime/queue.c') diff --git a/runtime/queue.c b/runtime/queue.c index 00eb76c7..554c6a43 100644 --- a/runtime/queue.c +++ b/runtime/queue.c @@ -88,6 +88,15 @@ static rsRetVal qqueueMultiEnqObjDirect(qqueue_t *pThis, multi_submit_t *pMultiS #define QUEUE_CHECKPOINT 1 #define QUEUE_NO_CHECKPOINT 0 +/* debug aid */ +static void displayBatchState(batch_t *pBatch) +{ + int i; + for(i = 0 ; i < pBatch->nElem ; ++i) { + dbgprintf("XXXXX: displayBatchState %p[%d]: %d\n", pBatch, i, pBatch->pElem[i].state); + } +} + /*********************************************************************** * we need a private data structure, the "to-delete" list. As C does * not provide any partly private data structures, we implement this @@ -882,6 +891,8 @@ rsRetVal qqueueEnqObjDirectBatch(qqueue_t *pThis, batch_t *pBatch) ASSERT(pThis != NULL); +dbgprintf("XXXXX: pre call consumer\n"); +displayBatchState(pBatch); /* calling the consumer is quite different here than it is from a worker thread */ /* we need to provide the consumer's return value back to the caller because in direct * mode the consumer probably has a lot to convey (which get's lost in the other modes @@ -892,6 +903,8 @@ rsRetVal qqueueEnqObjDirectBatch(qqueue_t *pThis, batch_t *pBatch) */ iRet = pThis->pConsumer(pThis->pUsr, pBatch, &pThis->bShutdownImmediate); +dbgprintf("XXXXX: post call consumer\n"); +displayBatchState(pBatch); RETiRet; } -- cgit v1.2.3 From 154747929f87010b444af2d552f980daafe451e6 Mon Sep 17 00:00:00 2001 From: Andre Lorbach Date: Thu, 18 Aug 2011 13:15:10 +0200 Subject: removed debug code from action.c and runtime/queue.c after testing --- runtime/queue.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'runtime/queue.c') diff --git a/runtime/queue.c b/runtime/queue.c index 554c6a43..9012abeb 100644 --- a/runtime/queue.c +++ b/runtime/queue.c @@ -891,8 +891,6 @@ rsRetVal qqueueEnqObjDirectBatch(qqueue_t *pThis, batch_t *pBatch) ASSERT(pThis != NULL); -dbgprintf("XXXXX: pre call consumer\n"); -displayBatchState(pBatch); /* calling the consumer is quite different here than it is from a worker thread */ /* we need to provide the consumer's return value back to the caller because in direct * mode the consumer probably has a lot to convey (which get's lost in the other modes @@ -903,8 +901,6 @@ displayBatchState(pBatch); */ iRet = pThis->pConsumer(pThis->pUsr, pBatch, &pThis->bShutdownImmediate); -dbgprintf("XXXXX: post call consumer\n"); -displayBatchState(pBatch); RETiRet; } -- cgit v1.2.3