At present, no overloads are needed because collections are interned, and
all other implemented data types are singletons. Tuples and user defined
types will need an overload.
Registration was done with a null shared_ptr<> instead of make_shared(),
and as a result the max template wasn't even instantiated, so it did not
even build.
To prevent name clashes, we don't call the virtual function implementing
this to_string(), but rather assignment_testable_source_context(), as its
use will be error reporting.
This reverts commit e605a0368a.
lowres_clock is not updated when reactor is not running and this
variant of time_it() is not meant to be run in a rector.
The debug-mode sanitizer discovered a bug in sstable::data_read.
I had optimistically wrote this code:
return data_stream_at(pos).read_exactly(len);
This is wrong - data_stream_at returns a temporary input_stream object,
which gets destructed immediately and doesn't live throughout the life
of read_exactly. Obviously, this object does need to live on (among other
things, it holds the buffer which read_exactly reads into).
The solution is an ugly variant of the same thing, but which allocates
memory to hold a copy of the input stream object. Because there is no
single reader (in theory we can have a hundred different reads ongoing
in parallel from the same sstable), we really have choice but to allocate
this read context somewhere. A better solution would not use an input
stream at all, but this is a different issue, already in a FIXME.
This patch fixes the sstable test failure that Jenkins reports.
Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Cassandra added support for specifying user-specified query handlers
instead of the default QueryProcessor in CASSANDRA-6659. We don't really
need that now and as we're C++, we cannot even support existing custom
query handlers. Therefore, remove the QueryHandler class and references
to it.
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
distributed::stop() passes the pointer to the instance being destroyed
by reference, in an attempt to keep things clean (by nulling the pointer
after deleting it). This is illegal, however, since the lambda is moved
in the bowels of submit_to(). In release mode this is optimized away so
the code works, but in debug mode it leads to a crash.
Fix by capturing by value instead (could also have been fixed by switching
the enclosing capture to a reference).
Credit to Gleb for identifying the problem.