Github user afs commented on a diff in the pull request:

    https://github.com/apache/jena/pull/164#discussion_r75635595
  
    --- Diff: 
jena-tdb/src/main/java/org/apache/jena/tdb/transaction/TransactionManager.java 
---
    @@ -613,21 +652,43 @@ public void flush() {
         }
         
         // -- The main operations to undertake when a transaction finishes.
    -    // Called from TSM_WriteBackEndTxn but the worker code is shere so all
    +    // Called from TSM_WriteBackEndTxn but the worker code is here so all
         // related code, including queue flushing is close together.
         
         private void readerFinishesWorker(Transaction txn) {
    -        if ( queue.size() >= QueueBatchSize )
    +        if ( checkForJournalFlush() )
                 processDelayedReplayQueue(txn) ;
         }
    -
    +    
         private void writerAbortsWorker(Transaction txn) {
    -        if ( queue.size() >= QueueBatchSize )
    +        if ( checkForJournalFlush() )
                 processDelayedReplayQueue(txn) ;
         }
         
    +    // Whether to try to flush the journal. We may stil find that we are 
blocked
    +    // from doing so by another transaction.
    +    private boolean checkForJournalFlush() {
    +//        System.err.printf("checkForJournalFlush: queue size=%d; journal 
size = %d\n", queue.size(), journal.size()) ;
    +//        System.err.printf("checkForJournalFlush: QueueBatchSize=%d; 
MaxQueueThreshold=%d; JournalThresholdSize=%d\n",
    +//                          QueueBatchSize, MaxQueueThreshold, 
JournalThresholdSize) ;
    +        if ( QueueBatchSize == 0 )
    --- End diff --
    
    True - remains of when JENA-1224 (excessive queue length was handled here 
... bit that didn't work out).  Tiding up done in the next commit.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to