[SERVER-14057] Changing TTL expiration time with collMod does not correctly update index definition Created: 27/May/14 Updated: 11/Jul/16 Resolved: 01/Dec/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Storage |
| Affects Version/s: | None |
| Fix Version/s: | 2.6.6, 2.8.0-rc2 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Steve Briskin (Inactive) | Assignee: | J Rassi |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Operating System: | ALL | ||||||||
| Backport Completed: | |||||||||
| Participants: | |||||||||
| Description |
|
Using collmod to adjust the TTL window prints an incorrect expireAfterSeconds_old value. I've had this happen several times on 2.6.0 and 2.6.1 but have not been able to reproduce it. The command was run around 2014-05-27T15:14:28.086+0000. index specs shows TTL to be 518400s.
Running collmod reports the old window to be 176400:
Oldest record in the collection:
|
| Comments |
| Comment by Githook User [ 01/Dec/14 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Author: {u'username': u'jrassi', u'name': u'Jason Rassi', u'email': u'rassi@10gen.com'}Message: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Githook User [ 01/Dec/14 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Author: {u'username': u'jrassi', u'name': u'Jason Rassi', u'email': u'rassi@10gen.com'}Message: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by J Rassi [ 24/Nov/14 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I have diagnosed this issue as a regression introduced in 2.6.0 by the introduction of the index catalog abstraction. In v2.4, all accesses of the index "info object" occur through the IndexDetails class, which reads directly from the on-disk index definition. In v2.6 and master, some accesses of the index "info object" occur through the index catalog, which reads from a cached copy of the index definition (owned by the IndexDescriptor). The bug is that the collMod command was not updated to invalidate this cached index definition. As a result, after running a collMod, some subsequent operations will read from an outdated index definition (including renameCollection, further calls to collMod, and more) until the collection or database is closed. See repro below (reproduces on 2.6.5 and 2.8.0-rc0).
|