Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert exception to string in driver #500

Merged
merged 1 commit into from
May 14, 2018

Conversation

danielmitterdorfer
Copy link
Member

With this commit we convert exceptions that occur in a load generator
actor before we communicate a BenchmarkFailure to the Driver actor.
This avoids deserialization errors in case the exception type is defined
in a track-specific extension.

Closes #498

With this commit we convert exceptions that occur in a load generator
actor before we communicate a `BenchmarkFailure` to the `Driver` actor.
This avoids deserialization errors in case the exception type is defined
in a track-specific extension.

Closes elastic#498
@danielmitterdorfer danielmitterdorfer added bug Something's wrong :Load Driver Changes that affect the core of the load driver such as scheduling, the measurement approach etc. labels May 14, 2018
@danielmitterdorfer danielmitterdorfer added this to the 0.12.0 milestone May 14, 2018
@danielmitterdorfer
Copy link
Member Author

Here is an example from the original reproduction scenario in the ticket. In rally-actor-messages.log we see:

2018-05-14 11:10:05,625 ActorAddr-(T|:53524)/PID:10170 rally.driver ERROR Could not execute schedule
Traceback (most recent call last):

  File "/Users/daniel/Projects/rally/esrally/driver/driver.py", line 998, in __call__
    total_ops, total_ops_unit, request_meta_data = execute_single(runner, self.es, params, self.abort_on_error)

  File "/Users/daniel/Projects/rally/esrally/driver/driver.py", line 1030, in execute_single
    return_value = runner(es, params)

  File "/Users/daniel/Projects/rally/esrally/driver/runner.py", line 80, in __call__
    return self.runnable(es['default'], *args[1:])

  File "/Users/daniel/Downloads/rally-eventdata-track/eventdata/runners/fieldstats_runner.py", line 41, in fieldstats
    raise ParameterError("No matching data found for field '{}' in pattern '{}'.".format(params['fieldname'], params['index_pattern']));

Note that ParameterError is defined by the track. In the actor system's internal log file we see:

2018-05-14 13:10:10.625113 p10160 I    OUCH!  Error deserializing received data: Traceback (most recent call last):
  File "/Users/daniel/Projects/rally/.venv/lib/python3.6/site-packages/thespian-3.8.3-py3.6.egg/thespian/system/transport/TCPTransport.py", line 1431, in _addedDataToIncoming
    rdata, extra = inc.data
  File "/Users/daniel/Projects/rally/.venv/lib/python3.6/site-packages/thespian-3.8.3-py3.6.egg/thespian/system/transport/TCPTransport.py", line 185, in data
    def data(self): return self._rData.completed()
  File "/Users/daniel/Projects/rally/.venv/lib/python3.6/site-packages/thespian-3.8.3-py3.6.egg/thespian/system/transport/streamBuffer.py", line 80, in completed
    return self._deserialize(self._buf), self._extra
ModuleNotFoundError: No module named 'eventdata'
  (rdata="", extra="")

Copy link
Contributor

@dliappis dliappis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching this very subtle bug! LGTM

@danielmitterdorfer
Copy link
Member Author

Thanks for the quick review!

@danielmitterdorfer danielmitterdorfer merged commit 3bd4320 into elastic:master May 14, 2018
@danielmitterdorfer danielmitterdorfer deleted the exc-serialize branch May 14, 2018 12:40
@danielmitterdorfer danielmitterdorfer modified the milestones: 0.12.0, 1.0.0 May 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something's wrong :Load Driver Changes that affect the core of the load driver such as scheduling, the measurement approach etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants