-
Type: Improvement
-
Resolution: Works as Designed
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Sessions
-
None
Summary
In mongosync, I want to be able to log the lsid and txnNumber of a transaction so I can easily search for problematic transactions in the oplog. Currently I can get the lsid from Session.ID() but that is not enough to uniquely identify a transaction.
I was thinking something like this:
func (s *sessionImpl) TxnNumber() int64 {
return s.clientSession.TxnNumber
}
And add TxnNumber() to the Session interface.
We already have Session.ID() so I think there is precedence for providing this kind of info in the public API for Session.
If we cannot get the txnNumber from the stable API, I would settle for a way to make the Go driver log it.
Motivation
Who is the affected end user?
TAR Team
How does this affect the end user?
Debugging BFs is greatly slowing our velocity. Improving our ability to debug will allow us to ship features quicker.
How likely is it that this problem or use case will occur?
Associating operations in logs with operations on the server is a common problem we face.
If the problem does occur, what are the consequences and how severe are they?
Lost time on debugging.
Is this issue urgent?
This is causing pain now so would be nice to discuss solutions soon.
Is this ticket required by a downstream team?
TAR
Is this ticket only for tests?
Just for test improvements.
Cast of Characters
Engineering Lead:
Document Author:
POCers:
Product Owner:
Program Manager:
Stakeholders: