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

Log slow transactions (mloginfo --transactions) #704

Closed
mitesh-gosavi opened this issue Jul 2, 2019 · 0 comments
Closed

Log slow transactions (mloginfo --transactions) #704

mitesh-gosavi opened this issue Jul 2, 2019 · 0 comments

Comments

@mitesh-gosavi
Copy link
Contributor

mitesh-gosavi commented Jul 2, 2019

Expected behavior

mloginfo must have a —transactions flag to display log lines for slow transactions similar to —queries flag. To make the information more readable, The following parameters must only be displayed in mloginfo

DATETIME
TXNNUMBER
AUTOCOMMIT
READCONCERN
TIMEACTIVEMICROS
TIMEINACTIVEMICROS
DURATION

For more detailed information, the user can search for the specific instance or line using mlogfilter —transactions flag and provide additional filters such as timestamp or —slow/—fast filters to narrow down the search domain.

Actual/current behaviour

mTools currently does not parse any information about slow transactions. These logs were added in Version 4.0.2 and up and are currently skipped over by the mloginfo and mlogfilter.

Steps to reproduce the actual/current behavior

mloginfo can have a —transactions flag. This flag can instruct the parser to look for lines containing the “transaction” label (for reference, see SERVER-36461). Once the line is found, the parameters can be parsed similiar to queries. The issue of legacy tokens as well as pre 2.5.2 tokens (tokens with spaces in between such as numYields: 2) must be dealt with separately with exceptions or if-else.

Environment

Software Version
mtools 1.5.3
MongoDB server 4.0.10
@mitesh-gosavi mitesh-gosavi changed the title Log the slow transactions Log slow transactions Jul 2, 2019
savinay-vijay added a commit to savinay-vijay/mtools that referenced this issue Jul 2, 2019
savinay-vijay added a commit to savinay-vijay/mtools that referenced this issue Jul 3, 2019
savinay-vijay added a commit to savinay-vijay/mtools that referenced this issue Jul 3, 2019
savinay-vijay added a commit to savinay-vijay/mtools that referenced this issue Jul 3, 2019
savinay-vijay added a commit to savinay-vijay/mtools that referenced this issue Jul 8, 2019
savinay-vijay added a commit to savinay-vijay/mtools that referenced this issue Jul 9, 2019
HenryGP pushed a commit to savinay-vijay/mtools that referenced this issue Jul 11, 2019
* Log slow transactions using mloginfo --transactions and mlogfilter --transactions

* rueckstiess#704 - Log Slow Transactions

* rueckstiess#704 - Log Slow Transactions Fixes 1

* Removed .idea directory

* rueckstiess#704 - Log Slow Transactions Fixes 2

* rueckstiess#704 Log Slow Transactions - Code Improvements

* rueckstiess#704 - Log Slow Transactions - Removed false try-exception blocks, indent corrections
@stennie stennie changed the title Log slow transactions Log slow transactions (mloginfo --transactions) Dec 27, 2019
@stennie stennie added this to the 1.6.0 milestone Dec 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants