Skip to content
Snippets Groups Projects
Commit 2ecaf2fc authored by Vladimir Davydov's avatar Vladimir Davydov Committed by Vladimir Davydov
Browse files

sequence: replace assertion with diag in sequence_data_iterator_create

We aren't planning to support all iterator types for _sequence read
views, but once we implement a Lua API for read views, the user will
still be able to create a read view of this space. So let's replace
the assertions with a graceful error.

Needed for https://github.com/tarantool/tarantool-ee/issues/197

NO_DOC=internal
NO_TEST=ee
NO_CHANGELOG=internal
parent 1aa186fa
No related branches found
No related tags found
No related merge requests found
...@@ -361,10 +361,11 @@ sequence_data_iterator_create(struct index_read_view *base, ...@@ -361,10 +361,11 @@ sequence_data_iterator_create(struct index_read_view *base,
enum iterator_type type, enum iterator_type type,
const char *key, uint32_t part_count) const char *key, uint32_t part_count)
{ {
assert(type == ITER_ALL); if (type != ITER_ALL) {
assert(key == NULL); diag_set(ClientError, ER_UNSUPPORTED,
assert(part_count == 0); "_sequence_data read view", "requested iterator type");
(void)type; return NULL;
}
(void)key; (void)key;
(void)part_count; (void)part_count;
struct sequence_data_read_view *rv = struct sequence_data_read_view *rv =
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment