[SERVER-41409] Expose the oldest active transaction timestamp in replSetGetStatus with an option Created: 30/May/19  Updated: 06/Jun/19  Resolved: 06/Jun/19

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Siyuan Zhou Assignee: Siyuan Zhou
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to TOOLS-2225 mongorestore 4.2 transaction support Closed
is related to TOOLS-2304 mongodump 4.2 transactions support Closed
Participants:

 Description   

Tools can get the oldest active transaction timestamp by a query on "config.transactions", but it's clearer to expose that timestamp in replSetGetStatus. Since we want to avoid table scan in replSetGetStatus, the value should be gated by an option, like the "initialSync" option.



 Comments   
Comment by David Golden [ 06/Jun/19 ]

I'll need to know the relevant fields for the table, but I think you can close this ticket.

Comment by Siyuan Zhou [ 04/Jun/19 ]

It's not documented. Here is the query initial sync uses for that.

Comment by David Golden [ 04/Jun/19 ]

Unless we can add a new command for this, I think for expediency we'll need to have tools scan the config.transaction table. Could you please point me to documentation for what exactly we need to do to extract the proper value?

Comment by Siyuan Zhou [ 03/Jun/19 ]

david.golden, the documentation only mentioned 3 actions available on the cluster resource. None of them can expose the oldest active transaction timestamp. Do you think it makes sense to allow backup role on replSetGetStatus? If so, we can ask Security team to weigh in.

Comment by David Golden [ 31/May/19 ]

From what I can tell, the 'backup' role does allow querying 'config.transactions'.

Comment by Siyuan Zhou [ 30/May/19 ]

david.golden, that's a good catch! Do tools have the privilege to read "config.transactions"? The doc doesn't mention that. AddingĀ replSetGetStatus to backup role also sounds an option.

Provides the insert and update actions on the mms.backup collection in the admin database and on the settings collection in the config database.

On the cluster as a whole, provides the

  • appendOplogNote
  • getParameter
  • listDatabases

Provides the find action on the following:

  • all non-system collections in the cluster, including those in the config and local databases
  • The following system collections in the cluster: system.indexes, system.namespaces, system.js, and system.profile
  • the admin.system.users and admin.system.roles collections
  • the config.settings collection
  • legacy system.users collections from versions of MongoDB prior to 2.6

Provides the insert and update actions on the config.settings collection.

Comment by David Golden [ 30/May/19 ]

Is there a way we can expose this via something that only requires the backup role instead of clusterManager? If not, then I suggest closing this ticket and tools will scan config.transactions.

Generated at Thu Feb 08 04:57:38 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.