You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Pavel Moravec (JIRA)" <ji...@apache.org> on 2015/05/21 14:51:00 UTC

[jira] [Resolved] (QPID-6551) [C++ broker]: linearstore raising JERR_LFCR_SEQNUMNOTFOUND after sending many DTX transactions

     [ https://issues.apache.org/jira/browse/QPID-6551?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pavel Moravec resolved QPID-6551.
---------------------------------
       Resolution: Fixed
    Fix Version/s: 0.33

Fixed by Kim's patch.

Verified this fixes the original problem with 2^16 journal files for tpl. Haven't be patient enough to verify the 2^32 journal files fix :).

> [C++ broker]: linearstore raising JERR_LFCR_SEQNUMNOTFOUND after sending many DTX transactions
> ----------------------------------------------------------------------------------------------
>
>                 Key: QPID-6551
>                 URL: https://issues.apache.org/jira/browse/QPID-6551
>             Project: Qpid
>          Issue Type: Bug
>          Components: C++ Broker
>            Reporter: Pavel Moravec
>            Assignee: Pavel Moravec
>             Fix For: 0.33
>
>         Attachments: JERR_LFCR_SEQNUMNOTFOUND.patch
>
>
> Sending many DTX transactions (such that tpl journal requires >64k journal files) causes a transaction fails with JERR_LFCR_SEQNUMNOTFOUND journal error:
> jexception 0x0500 LinearFileController::find() threw JERR_LFCR_SEQNUMNOTFOUND: File sequence number not found (fileSeqNumber=0)
> Reproducer:
> nohup ./src/qpidd --load-module=src/linearstore.so --efp-file-size=32 --log-to-file=/tmp/qpidd.log &
> # the --efp-file-size parameter is just for faster reproducer
> ./src/tests/qpid-txtest --dtx=yes --check=no --init=yes --tx-count=10 --total-messages=1000 --size=1
> nohup ./src/tests/qpid-txtest --dtx=yes --check=no --init=no --tx-count=200000 --size=1 &
> After a (longer) while, linearstore raises JERR_LFCR_SEQNUMNOTFOUND and subsequently various other exceptions/errors.
> The root cause is:
> - qpid/linearstore/journal/txn_map.h declares uint16_t pfid_
> - but it needs to store file sequence number stored as uint64_t elsewhere
> - for 65536th journal file (of tpl journal), re-casting uint64_t to uint16_t returns obvious zero
> - but there is no file number zero in the journal 
> Fix just being tested:
> $ svn diff
> Index: qpid/linearstore/journal/txn_map.cpp
> ===================================================================
> --- qpid/linearstore/journal/txn_map.cpp	(revision 1680527)
> +++ qpid/linearstore/journal/txn_map.cpp	(working copy)
> @@ -36,7 +36,7 @@
>  
>  txn_data_t::txn_data_t(const uint64_t rid,
>                         const uint64_t drid,
> -                       const uint16_t pfid,
> +                       const uint64_t pfid,
>                         const uint64_t foffs,
>                         const bool enq_flag,
>                         const bool tpc_flag,
> Index: qpid/linearstore/journal/txn_map.h
> ===================================================================
> --- qpid/linearstore/journal/txn_map.h	(revision 1680527)
> +++ qpid/linearstore/journal/txn_map.h	(working copy)
> @@ -39,7 +39,7 @@
>      {
>          uint64_t rid_;      ///< Record id for this operation
>          uint64_t drid_;     ///< Dequeue record id for this operation
> -        uint16_t pfid_;     ///< Physical file id, to be used when transferring to emap on commit
> +        uint64_t pfid_;     ///< Physical file id, to be used when transferring to emap on commit
>          uint64_t foffs_;    ///< Offset in file for this record
>          bool enq_flag_;     ///< If true, enq op, otherwise deq op
>          bool tpc_flag_;     ///< 2PC transaction if true
> @@ -47,7 +47,7 @@
>          bool aio_compl_;    ///< Initially false, set to true when record AIO returns
>          txn_data_t(const uint64_t rid,
>                     const uint64_t drid,
> -                   const uint16_t pfid,
> +                   const uint64_t pfid,
>                     const uint64_t foffs,
>                     const bool enq_flag,
>                     const bool tpc_flag,
> $



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org