We are targeting the 2.1.x series so advertise that we're Cassandra
2.1.8 which is the latest stable release.
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
This is a long-awaited cleanup. Gossiper code runs every second, it is
not performance sensitive, so it does not make much sense to stick to
lowres db_clock, use high_resolution_clock instead.
If we receive an unknown consistency level, fail with PROTOCOL_ERROR. If
we're trying to send out an unknown consistency level, fail with
SERVER_ERROR.
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
If we don't recognize a frame version, throw a protocol_exception like
Origin does rather than killing the process.
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
If the switch statements don't match to change or target type
enumerations, throw a invalid_argument exception that's translated to
proper SERVER_ERROR. The error is not triggerable in practice as
change_type and target_type are enumerations. However, the compiler is
unhappy if we don't have them so lets just clean them up.
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Throw a runtime_exception which is translated to proper SERVER_ERROR
message rather than killing the process with assert().
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
If we encounter an unknown opcode, throw a protocol exception rather
than killing the process with assert().
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
"With the seastar patch below, if we have this code
engine().at_exit([] { return f1() });
engine().at_exit([] { return f2() });
We can make sure f2 is called before f1, like
f2.then([] {
reutrn f1();
})
We can use this feature to simplfy deinit code a lot. If we have the correct
init order, the deinit order will be correct if we always call
engine().at_exit() when we do init."
This patch introduce init.cc file which hosts all the initialization
code. The benefits are 1) we can share initialization code with tests
code. 2) all the service startup dependency / order code is in one
single place instead of everywhere.
581f262a2024cb9afb3ba6fee53080787fe10cb9 Revert "Merge "Adding NAT Adapter" from Takuya"
8d333aea8721ad110bced638824a155ad9ae052e reactor: Run at_exit functions in LIFO order
0eb3175ed8cfcfc3f6932c5ce32af6b87c9be6bd httpd: Allow specifying ip address to listen on
b0c8b806ce2791298dc637b062ff69681df90cdf Merge "Adding NAT Adapter" from Takuya
423e593dbc9cab87f06f32b4486d61113ce10a05 tests: Add packet class test
b648d924bfe0bf516ca09a47c8d9802147f50905 Add scripts & config files for install / startup SeaStar instance
4be17878e204fbc397b71080a83d7588008657ae Hook network stack for NAT adapter
a1c817c00bce81faded663a2415f1dc40dc88928 Add NAT adapter
cd0703c538c5d5c484748dc1ad8951bc7e62db45 native-stack: add create_device() function to share create_native_net_device() code with nat-adapter
afe4e197c35acf00435e897d65994dbe665b1639 packet: implement untrim_front() and untrim_back()
c74ce091aa1bc5ea9e65eb83f92919bd9084742c ip: Add an argument to modify local port range
6f5101f8cd3b35040bb4e26b9d02ae075a774e2a ip: Add ipv4_address::to_string()
01337bd09020223be9bb9c63428ce89e24f1c98b future: remove incorrect noexcept specifications from schedule()
fa8d7401d66adb13e9f4892b674fff6c32fbf52e future: catch exceptions thrown while scheduling a continuation
All error messages encode a error message as well. It sometimes pays off
to read the fine print in specs:
"4.2.1. ERROR
Indicates an error processing a request. The body of the message will be an
error code ([int]) followed by a [string] error message. Then, depending on
the exception, more content may follow. The error codes are defined in
Section 9, along with their additional content if any."
Fixes#32.
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
The at_exit() callback needs to return a future. In one place we forgot,
and now that at_exit() takes an std::function<>, this is verified at
compilation time and fails compilation.
Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
The statement being removed in this patch is wrong, and nonexistent in Origin.
If the list of column aliases is empty, we should leave it this way.
This code was already present before the compact storage series. But because
tables created using the schema_builder directly won't exercise this code path,
I ended up not noticing - specially because it only happens with tables that
lack a clustering key. The ones I tested through cqlsh, all had a clustering
key.
Fixes#45
Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
From Pekka:
This series cleans up consistency_level.hh dependency issues that allow
us to use 'enum consistency_level' cleanly in CQL transport layer
exceptions in exceptions.hh. No functional changes.
We must wait for the system tables to be loaded on all shards before
populating the other keyspaces, or we might miss some keyspaces or column
families. This is hinted at by the fact that we use storage_proxy, which
isn't usable until the system keyspace is ready.
Credit to Tomek for identifying the problem and the fix.
Now that consistency level dependency issues are sorted out, move
request_timeout_exception to exceptions.hh.
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Move unavailable_exception to exceptions.hh where other CQL transport
level exceptions are defined in.
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Move 'consistency_level' enumeration to a separate header file to fix
dependency issues that arise when we move 'unavailable_exception' to
exceptions.hh.
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Cleanup consistency_level.hh by removing untranslated code that's been
sitting in the tree for a while.
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>