HCL Commerce Version 9.1.13.0 or later

prohibitConcurrentCacheMiss query server configuration

The new prohibitConcurrentCacheMiss has the configuration value true and is enabled by default. It can be disabled by setting it to false in the CrossTransactionCache section in the query server wc-component.json configuration file. When configured as true, the result is a decrease in the burden imposed on the ElasticSearch servers due to not repeatedly executing the same query from the same query server.

When either the CrossTransactionCache/ avoidConcurrentCacheMiss or the CrossTransactionCache/ prohibitConcurrentCacheMiss configuration value is true, a CacheEntryLock (unique for a particular cache id) is acquired before a cache miss is processed. This causes concurrent cache misses for the same cache id in the same query server JVM to wait until the thread holding the lock has finished processing the cache miss. When the waiting thread resumes, it looks in the cache to find the cache entry just placed there by the thread previously holding the lock. The effect is to avoid issuing the same query from the same query server more times than necessary, thus reducing the load placed on the ElasticSearch servers.

The CacheEntryLock can be configured with a maximum number of threads that can be waiting for the lock at any one time, and with a maximum number of seconds a thread can wait to acquire the lock. When either of those two limits is exceeded, a thread will either proceed and process the cache miss (when prohibitConcurrentCacheMiss is false) or terminate the current query server request (when prohibitConcurrentCacheMiss is true). An HTTP response code of 429 will be returned if the thread is terminated.

The CacheEntryLock is configured in the com.ibm.commerce.datatype.CacheEntryLock section of the wc-component.json configuration file.

The threshold configuration specifies the maximum number of threads waiting at any time.

The maxWaitSeconds configuration specifies the maximum number of seconds a thread can wait to acquire the lock.

For more information on the wc-component.json configuration file for the Elasticsearch query server, see Configuring Query services in ZooKeeper.