[SERVER-36104] LogicalSessions should destroy cache on setting FCV from 3.6 to 3.4 Created: 12/Jul/18 Updated: 02/Nov/18 Resolved: 01/Nov/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Misha Tyulenev | Assignee: | Misha Tyulenev |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Sprint: | Sharding 2018-09-24, Sharding 2018-10-22, Sharding 2018-11-05 | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Description |
|
Currently, sessions do not fully support upgrade/downgrade. In particular, the LogicalSessionsCache does not handle the scenario with FCV 3.6 downgrade to FCV 3.4. Suggested Fix
WorkaroundIn the case FCV is set to 3.4 to 3.6 the sessions collection will exist and on a sharded cluster mongos will not be able to detect that it should stop sending the logicalSessionsTimeoutMinues field in the isMaster response. Hence drivers per the spec will keep creating sessions implicitly and it may lead to exceeding the maximum 1000,000 sessions limit. Its critically important to be sure that the refresh thread that updates logical sessions cache is not running on the config server when dropping the config.systems.sessions collection as it may cause a config server crash per |
| Comments |
| Comment by Misha Tyulenev [ 01/Nov/18 ] |
|
The workaround is added to the description, THe issue will affect only sharded clusters with FCV change 3.6->3.4 |
| Comment by Misha Tyulenev [ 01/Nov/18 ] |
|
Not fixing this issue in 3.6 as it can be too risky to drop the collection and kill the sessions. |
| Comment by Bernie Hackett [ 24/Oct/18 ] |
|
This sounds reasonable to me. Not returning logicalSessionsTimeoutMinutes in ismaster is the key thing for drivers. |
| Comment by Misha Tyulenev [ 24/Oct/18 ] |
|
jeff.yemin behackett Please confirm that this behavior will be correct |
| Comment by Misha Tyulenev [ 01/Oct/18 ] |
|
max.hirschhorn I suggest making the change in the 3.6 branch only |
| Comment by Max Hirschhorn [ 30/Sep/18 ] |
greg.mckeon, misha.tyulenev, given the "LogicalSessions should destroy cache on setting FCV from 3.6 to 3.4 " title of this ticket and the "TODO SERVER-36104" comment that exists only on the 3.6 branch, could you please clarify whether this ticket represents (a) a change to the master branch for how we'll handle the session catalog and featureCompatibilityVersion downgrades going forward - subsequently backporting to the 3.6 branch, or (b) a change only to the 3.6 branch? |
| Comment by Esha Maharishi (Inactive) [ 20/Jul/18 ] |
|
Ok, putting back into Needs Triage. |
| Comment by Misha Tyulenev [ 20/Jul/18 ] |
|
esha.maharishi its a nice to have feature, I have recently committed code that ignores sessions if FCV is not 3.6 - https://github.com/mongodb/mongo/commit/646d68003cadcd60fed5abaf1e92368390a4a1cb#diff-4564c6051c66e89d319ed96f26eaa7e1R276 |