Better test diag output on OOM (#42989)
If linearizability checking fails with OOM (or other exception), we did not get the serialized history written into the log, making it difficult to debug in cases where the problem is hard to reproduce. Fixed to always attempt dumping the serialized history. Related to #42244
This commit is contained in:
parent
79052050bf
commit
6a77dde5ea
|
@ -447,13 +447,17 @@ public class ConcurrentSeqNoVersioningIT extends AbstractDisruptionTestCase {
|
|||
logger.info("--> Linearizability checking history of size: {} for key: {} and initialVersion: {}: {}", history.size(),
|
||||
id, initialVersion, history);
|
||||
LinearizabilityChecker.SequentialSpec spec = new CASSequentialSpec(initialVersion);
|
||||
boolean linearizable = new LinearizabilityChecker().isLinearizable(spec, history, missingResponseGenerator());
|
||||
boolean linearizable = false;
|
||||
try {
|
||||
linearizable = new LinearizabilityChecker().isLinearizable(spec, history, missingResponseGenerator());
|
||||
} finally {
|
||||
// implicitly test that we can serialize all histories.
|
||||
String serializedHistory = base64Serialize(history);
|
||||
if (linearizable == false) {
|
||||
// we dump base64 encoded data, since the nature of this test is that it does not reproduce even with same seed.
|
||||
logger.error("Linearizability check failed. Spec: {}, initial version: {}, serialized history: {}", spec, initialVersion,
|
||||
serializedHistory);
|
||||
logger.error("Linearizability check failed. Spec: {}, initial version: {}, serialized history: {}",
|
||||
spec, initialVersion, serializedHistory);
|
||||
}
|
||||
}
|
||||
return linearizable;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue