Conversation
It would not have worked naturally to set this after init pools would not be updated implicitly, but there would be ways of actually doing it. PYTHON-569
PYTHON-569
PYTHON-569
PYTHON-569
| especially as the database platform evolves more complex workloads. | ||
|
|
||
| The Execution Profile API is being introduced now, in an experimental capacity in order to take advantage of it in | ||
| existing projects, and to guage interest and feedback in the community. For now, the legacy configuration remains |
PYTHON-569
PYTHON-569
PYTHON-569
|
+1 Awesome work \o/ |
| if not isinstance(profile, ExecutionProfile): | ||
| raise TypeError("profile must be an instance of ExecutionProfile") | ||
| if self._config_mode == _ConfigMode.LEGACY: | ||
| raise ValueError("Cannot add execution profiles when legacy parameters are set explicitly. TODO: link to doc") |
There was a problem hiding this comment.
You have a stray TODO in the error message. Maybe make that into a comment above instead.
There was a problem hiding this comment.
or just put the link in :)
Thanks
| row_factory = self.row_factory | ||
| load_balancing_policy = self.cluster.load_balancing_policy | ||
| else: | ||
| execution_profile = self._get_execution_profile(execution_profile) |
There was a problem hiding this comment.
This implies that the execution_profile could be a string (e.g. the name of a profile) or an ExecutionProfile instance. If the latter, isn't it possible that the ExecutionProfile is not configured with available hosts, not registered in the profile-manager, etc. Wouldn't it be safer to require the arg to be a registered profile name only?
There was a problem hiding this comment.
It's useful for one-off executions, intended for after we remove legacy execute parameters. See http://datastax.github.io/python-driver/api/cassandra/cluster.html#cassandra.cluster.Session.execution_profile_clone_update, as mentioned in the docstring.
No description provided.