[SERVER-17895] Server should not clear collection plan cache periodically when write operations are issued Created: 06/Apr/15  Updated: 15/Mar/17  Resolved: 23/Jul/15

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: 3.0.7, 3.1.7

Type: Improvement Priority: Major - P3
Reporter: J Rassi Assignee: David Storch
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-15225 CachedPlanStage should execute for tr... Closed
Related
related to DOCS-6401 Updates to query plan revision as of ... Closed
related to SERVER-28314 Remove unused PlanCache::_writeOperat... Closed
Backwards Compatibility: Fully Compatible
Backport Completed:
Sprint: Quint Iteration 7
Participants:

 Description   

Each collection's query plan cache for is currently cleared after 1000 write operations are issued against the collection. This gives distribution changes a chance to affect planning decisions for query shapes that are already cached.

However, clearing the entire plan cache is aggressive, and at worst will cause deployments with a heavy write load to effectively not use the query plan cache at all.

This mechanism will be made obsolete by SERVER-15225. When SERVER-15225 is resolved, we should remove it entirely.



 Comments   
Comment by Githook User [ 26/Aug/15 ]

Author:

{u'username': u'coollog', u'name': u'Qingyang Chen', u'email': u'qingyang.chen@10gen.com'}

Message: SERVER-17895 Remove clearing plan cache after 1000 write ops

(cherry picked from commit 26c5394f79d12ac1c9df7263199e2926ee2e19ff)

Conflicts:
src/mongo/db/catalog/collection.cpp
src/mongo/db/query/plan_cache.cpp
src/mongo/db/query/plan_cache.h
src/mongo/db/query/plan_cache_test.cpp
src/mongo/db/query/query_knobs.cpp
src/mongo/db/query/query_knobs.h
Branch: v3.0
https://github.com/mongodb/mongo/commit/8b975d0005e324516842fb30b2a13c86dc832514

Comment by Githook User [ 28/Jul/15 ]

Author:

{u'username': u'coollog', u'name': u'Qingyang Chen', u'email': u'qingyang.chen@10gen.com'}

Message: SERVER-17895 Remove clearing plan cache after 1000 write ops
Branch: master
https://github.com/mongodb/mongo/commit/26c5394f79d12ac1c9df7263199e2926ee2e19ff

Comment by Githook User [ 23/Jul/15 ]

Author:

{u'username': u'coollog', u'name': u'Qingyang Chen', u'email': u'qingyang.chen@10gen.com'}

Message: SERVER-17895 Remove clearing plan cache after 1000 write ops
Branch: master
https://github.com/mongodb/mongo/commit/26c5394f79d12ac1c9df7263199e2926ee2e19ff

Generated at Thu Feb 08 03:45:56 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.