Summary: | HTTP Cache is broken when using "Retrieve all embedded resources" with concurrent pool | ||
---|---|---|---|
Product: | JMeter - Now in Github | Reporter: | shmulikk |
Component: | HTTP | Assignee: | JMeter issues mailing list <issues> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | shmulikk |
Priority: | P2 | ||
Version: | 2.5 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | All | ||
Bug Depends on: | |||
Bug Blocks: | 51916 |
Description
shmulikk
2011-09-01 12:06:04 UTC
Caused by current implementation of CacheManager, which using ThreadLocal to separate Cache for each thread(virtual user). This is causing to separate the Cache to each thread in the concurrent pool, thus breaking the cache. Currently in CacheManager.java: private transient ThreadLocal<Map<String, CacheEntry>> threadCache; Suggested solution: Removing ThreadLocal from the code. Changing the key to include the url (current key) + ThreadName. Good catch. Thanks for report. Fixed with InheritableThreadLocal (concurrent threads pool are chlidren of main http request/virtual user) URL: http://svn.apache.org/viewvc?rev=1166165&view=rev Log: Bug 51752 - HTTP Cache is broken when using "Retrieve all embedded resources" with concurrent pool Modified: jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/CacheManager.java jakarta/jmeter/trunk/xdocs/changes.xml Not good. Don't works with several loops (works only on same loop for same embebbed resources) Need some additionnal works Oups !!! Works with loops, I forget to unchecked "Clear cache each iteration?" on HTTP Cache manager on my test plan. Sorry from SPAM. This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2523 |