[OP-105] Render the cassandra client read timeout configurable Created: 08/Oct/14  Updated: 19/Mar/18  Resolved: 13/Oct/14

Status: Closed
Project: Opush
Component/s: None
Affects Version/s: 3.0.1
Fix Version/s: 3.0.2

Type: Improvement Priority: Normal
Reporter: Thomas HILAIRE Assignee: Stephane COLSON
Resolution: Fixed Votes: 0
Labels: 201409, GN
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Rank: 6482
Sprint: Sprint

 Description   

Render the cassandra client read timeout configurable.

Expected behavior:
You can define in /etc/opush/cassandra the key "cassandra.read-timeout-ms" with a number >= 0
It should change the default read timeout of the cassandra client.



 Comments   
Comment by Thomas HILAIRE [ 08/Oct/14 ]

Impacts: none
QA: it's a hidden configuration so a real QA is not required.
Just verify the value of "CASSANDRA CLIENT READ TIMEOUT" in log with the CASSANDRA logger enabled with level="DEBUG" at opush's startup.
A negative number should not allow opush to start.

Comment by Stephane COLSON [ 13/Oct/14 ]

OPush cannot start when cassandra.read-timeout-ms > 0 (tested with 5)

09:27:42.484 [WARN ] {n.s.e.config.CacheConfiguration} [t/c/r/] Cache: request has a maxElementsInMemory of 0. This might lead to performance degradation or OutOfMemoryError at Terracotta client.From Ehcache 2.0 onwards this has been changed to mean a store with no capacity limit. Set it to 1 if you want no elements cached in memory
09:27:43.887 [WARN ] {c.d.driver.core.FrameCompressor} [t/c/r/] Cannot find Snappy class, you should make sure the Snappy library is in the classpath if you intend to use it. Snappy compression will not be available for the protocol.
09:27:43.887 [WARN ] {c.d.driver.core.FrameCompressor} [t/c/r/] Cannot find LZ4 class, you should make sure the LZ4 library is in the classpath if you intend to use it. LZ4 compression will not be available for the protocol.
09:27:44.272 [ERROR] {CONFIGURATION} [t/c/r/] Cannot establish Cassandra connection: All host(s) tried for query failed (tried: /10.69.1.24 (com.datastax.driver.core.ConnectionException: [/10.69.1.24] Unexpected error during transport initialization (com.datastax.driver.core.ConnectionException: [/10.69.1.24] Operation Timeouted)))
09:27:44.275 [ERROR] {CONTAINER} [t/c/r/] All host(s) tried for query failed (tried: /10.69.1.24 (com.datastax.driver.core.ConnectionException: [/10.69.1.24] Unexpected error during transport initialization (com.datastax.driver.core.ConnectionException: [/10.69.1.24] Operation Timeouted))), starting administration services only

With cassandra.read-timeout-ms = 0

09:26:07.297 [WARN ] {n.s.e.config.CacheConfiguration} [t/c/r/] Cache: request has a maxElementsInMemory of 0. This might lead to performance degradation or OutOfMemoryError at Terracotta client.From Ehcache 2.0
 onwards this has been changed to mean a store with no capacity limit. Set it to 1 if you want no elements cached in memory
09:26:08.709 [WARN ] {c.d.driver.core.FrameCompressor} [t/c/r/] Cannot find Snappy class, you should make sure the Snappy library is in the classpath if you intend to use it. Snappy compression will not be avail
able for the protocol.
09:26:08.709 [WARN ] {c.d.driver.core.FrameCompressor} [t/c/r/] Cannot find LZ4 class, you should make sure the LZ4 library is in the classpath if you intend to use it. LZ4 compression will not be available for 
the protocol.
09:26:09.552 [DEBUG] {CASSANDRA} [t/c/r/] perform getCurrentVersion request SELECT version,date FROM schema_version WHERE id=1 ORDER BY version DESC LIMIT 1;
09:26:09.557 [DEBUG] {CASSANDRA} [t/c/r/] Current version found VersionUpdate{version=Version{version=3}, date=Fri Oct 10 15:20:43 GMT 2014}
09:26:09.773 [WARN ] {o.e.j.s.handler.ContextHandler} [t/c/r/] o.e.j.s.ServletContextHandler@48da23d0{/,null,null} contextPath ends with /
09:26:09.868 [WARN ] {n.s.e.config.CacheConfiguration} [t/c/r/] Cache: RequestInfoStore has a maxElementsInMemory of 0. This might lead to performance degradation or OutOfMemoryError at Terracotta client.From Ehcache 2.0 onwards this has been changed to mean a store with no capacity limit. Set it to 1 if you want no elements cached in memory

Tested on CentOS with opush-3.0.2~beta3~git20141009.091827.60ca887-1 and OBM 2.5.9-0.alpha4+git20141010_1919_50b4ea6

Comment by Stephane COLSON [ 13/Oct/14 ]

OK, last test was just legally timeouting.
With a value of 100 or 500 ms, Opush starts normally.

Generated at Tue Oct 15 06:32:20 CEST 2019 using JIRA 6.1.1#6155-sha1:7188aeec9a6b57d61ea04c52f235f15f55c105e2.