ESRally - How to add assertion logic

Is there any way to add assertion logic into ESRally?
For example, after bulk operation is completed, I want to assert that number of documents indexed are as expected.
I found that ESRally doesn't throw any error/stop when there is something wrong with corpus.
For example, having 4 documents with one malformed document will still result in successful run, but there are only 3 documents in ES.


this might be possible if you implement a custom runner. However, in your case a simpler solution might help. Rally has a "lenient" mode where Rally only records that an error has happened and reports this as "error rate". This mode is the default. There is also a strict mode which will abort the benchmark immediately when an error occurs. You can enable this mode with the command line flag --on-error=abort (the default is --on-error=continue, see also the docs).


1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.