mongo icon indicating copy to clipboard operation
mongo copied to clipboard

oauth2_txt, oauth2_txn.stash

Open qkrgksqkr opened this issue 4 years ago • 1 comments
trafficstars

What for collection named 'oauth2_txn' and 'oauth2_txn.stash?? Documents in this collection remains forever, no expire date. is it ok delete this docuemt in 'oauth2_txn' and 'oauth2_txn.stash collection?

qkrgksqkr avatar Feb 17 '21 05:02 qkrgksqkr

mongo package of oauth2 is using multi-doc transaction to store data into multiple collection at once. because below version 4 of mongo doesn't support transaction.

https://pkg.go.dev/labix.org/v2/mgo/txn#Runner

to use txn package by mongo package it should define transaction collection named oauth2_txn

and txn package is making .stash collection itself.

so oauth2 package is making 2 collections named oauth2_txn, oauth2_txn.stash. but anyway oauth2 doesn't know 2 collections is going to create or not.

nzin4x avatar Jan 06 '22 06:01 nzin4x