[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: |
|
||||||||||||
| 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.
|
| 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. |