[SERVER-27220] TTL index doesn't work on MongoDB for Windows Created: 30/Nov/16 Updated: 02/Dec/16 Resolved: 02/Dec/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | TTL |
| Affects Version/s: | 3.4.0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Vyacheslav Stroy | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Windows 10, MongoDB 3.4.0 2008plus-ssl, storage: mmapv1, journal enabled |
||
| Operating System: | ALL | ||
| Steps To Reproduce: |
|
||
| Participants: |
| Description |
|
TTL index doesn't work. |
| Comments |
| Comment by Kelsey Schubert [ 02/Dec/16 ] | |||||||||||
|
Hi kreig, Thanks for letting us know – I'm glad you were able to identify the root cause of the issue. For MongoDB-related support discussion please feel free to post on the mongodb-users group or Stack Overflow with the mongodb tag. Kind regards, | |||||||||||
| Comment by Vyacheslav Stroy [ 02/Dec/16 ] | |||||||||||
|
I found the problem.
I was searching for [TTLMonitor] occurrences as it was recommended by @Dan and payed no attention to the warning. | |||||||||||
| Comment by Kelsey Schubert [ 30/Nov/16 ] | |||||||||||
|
Hi kreig, Would you please attach the complete log at log verbosity 1, so we can investigate? Additionally, would you please execute the same steps on MongoDB 3.2.11, and provide the complete logs at verbosity 1 so we can determine whether this is a regression? Thank you, | |||||||||||
| Comment by Vyacheslav Stroy [ 30/Nov/16 ] | |||||||||||
|
There are no records from [TTLMonitor] in the log. It looks like TTLMonitor thread never starts. I have restarted database several times. And also tried to disable and re-enable TTLMonitor using
Nothing works. Maybe there are some additional settings? | |||||||||||
| Comment by Mark Benvenuto [ 30/Nov/16 ] | |||||||||||
|
I was not able to repro with the steps you provided above. It may be difficult to see in the log where the TTLMonitor is started since it is not immediately started with other threads. Here is an example of log output that has been trimmed to show some relevant log lines from "./mongod.exe --storageEngine=mmapv1 -v"
| |||||||||||
| Comment by Vyacheslav Stroy [ 30/Nov/16 ] | |||||||||||
|
TTLMonitor thread doesn't run at all.
I can see ClientCursorMonitor and PeriodicTaskRunner startup, but TTLMonitor never starts.
I'm running `mongod` with default configuration options. Some more diagnostic info:
| |||||||||||
| Comment by Daniel Pasette (Inactive) [ 30/Nov/16 ] | |||||||||||
|
If you run mongod with verbose level set to 1, you can see the TTL monitor running. It only runs once a minute, so you may have to wait up to 119 seconds for the monitor to detect and delete the record from your example. To do so, execute mongod -v. Look for a message in the logs like the following to indicate it is running:
And you can see that the monitor started normally (earlier in the logs) by finding this message in the logs:
|