Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the Debug participant extend the doPrepare(...) method to get profile dump the debug participant's timing info #256

Closed
chhil opened this issue Jul 7, 2022 · 4 comments

Comments

@chhil
Copy link
Contributor

chhil commented Jul 7, 2022

public int prepare (long id, Serializable o) {
// Logger.log (createEvent ("prepare", id, (Context) o));
return PREPARED | READONLY;
}

Since Debug.java extends the TxnSupport's prepare(...) method instead of doPrepare(...) the profiler does not create the checkpoint and no timing info is available for the debug participant.

Similarly abort can be changed to doPrepareForAbort(...)

@chhil
Copy link
Contributor Author

chhil commented Jul 7, 2022

This may not be an issue.

I had the debug flag set to true and the debug participant added, this ended up creating 2 context loggings for one transaction.

I kept the flag and removed the participant and one entry got logged and the profiler entry for debug got logged too.

However I did notice that the commit entry in the log did not have a commit id.

<log realm="org.jpos.transaction.TransactionManager" at="2022-07-07T20:01:32.337" lifespan="2852ms">
  <commit>
    banknet-txnmgr-9:idle:1
    <context>
      NANOSTART: 114558888454917
      REQUEST: 
       <isomsg direction="incoming">
         <!-- org.jpos.iso.packager.GenericPackager[cfg/banknet_ebcidic_pci.xml] -->
         <field id="bitmap" value="{2, 3, 4, 6, 7, 10, 11, 12, 13, 14, 15, 16, 18, 22, 28, 32, 33, 35, 37, 41, 42, 43, 48, 49, 51, 61, 63}" type="bitmap"/>

Is this expected?

@ar
Copy link
Member

ar commented Jul 20, 2022

The Debug participant functionality have been incorporated into the TransactionManager itself. The main reason for doing that was to emit in the same LogEvent profiling information. We don't have Debug and Trace events separated anymore, they get automatically emitted by the TM at the end of every transaction (provided the debug is on, which is usually the case).

Regarding the commit ID, it's right there: banknet-txnmgr-9:idle:1 - the 1 there is the commit ID.

@ar ar closed this as completed Jul 20, 2022
@chhil
Copy link
Contributor Author

chhil commented Jul 21, 2022

Maybe we can document the following.

If you use the debug flag don't use the debug participant, otherwise you end up with 2 context log entries in the log.

@ar
Copy link
Member

ar commented Jul 21, 2022

Done in jPOS-EE (bc9ceff).

jPOS-EE.pdf has been updated, the new notice looks like this:

Screen Shot 2022-07-21 at 16 06 35

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants