[SERVER-28436] Implement KeysCollectionManager Created: 22/Mar/17 Updated: 06/Dec/17 Resolved: 25/Apr/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 3.5.7 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Misha Tyulenev | Assignee: | Randolph Tan |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Sprint: | Sharding 2017-05-08 | ||||||||
| Participants: | |||||||||
| Description |
|
KeysCollectionManager is installed on the service context so the LogicalClock can get the key that matches the signature generation. Pseudo code:
|
| Comments |
| Comment by Githook User [ 25/Apr/17 ] |
|
Author: {u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}Message: |
| Comment by Githook User [ 25/Apr/17 ] |
|
Author: {u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}Message: |
| Comment by Misha Tyulenev [ 03/Apr/17 ] |
|
That could be composed in the updater. i.e.the reader and KeyCollectionManager remain as proposed, while the updater class may contain the reader. This will not affect the Manager as it will just switch the class that is called by the thread |
| Comment by Randolph Tan [ 30/Mar/17 ] |
|
I just remembered one of the key aspects of the original design: the keys used for signing should have been read from a committed view. That makes me think that the reader should always be active and the updater is active only if it's a config primary. |
| Comment by Misha Tyulenev [ 30/Mar/17 ] |
|
Thanks for the feedback. The KeyManager does not read or write itself. It owns the thread that schedules work and it implements an API that is called when the node where it runs goes from/to config primary. Going forward it may also serve as a cache. |
| Comment by Randolph Tan [ 30/Mar/17 ] |
|
It sounds like the KeyManager would works only in 2 modes - updater or reader. I believe at minimum, the KeyManager of the config should read the latest local key when it transitions to primary. This is because it only refreshes the key periodically and doesn't monitor the new keys in real time. |
| Comment by Misha Tyulenev [ 30/Mar/17 ] |
|
kaloian.manassiev renctan please review the proposal |