Commit Graph

39 Commits

Author SHA1 Message Date
Calle Wilund
63b6c6bb5a migration_manager: Implement announce_keyspace_update
More or less the same as create keyspace...
2016-05-10 14:34:51 +00:00
Duarte Nunes
08a7bba4ed udt: Announce UDT migrations
This patch defines the member functions responsible for announce
create, update and drop user defined types migration.

Signed-off-by: Duarte Nunes <duarte@scylladb.com>
2016-04-20 09:54:06 +02:00
Duarte Nunes
37a1547971 udt: Add migration notifications
This patch adds migration notifications for user defined types.

Signed-off-by: Duarte Nunes <duarte@scylladb.com>
2016-04-20 09:54:06 +02:00
Pekka Enberg
38a54df863 Fix pre-ScyllaDB copyright statements
People keep tripping over the old copyrights and copy-pasting them to
new files. Search and replace "Cloudius Systems" with "ScyllaDB".

Message-Id: <1460013664-25966-1-git-send-email-penberg@scylladb.com>
2016-04-08 08:12:47 +03:00
Pekka Enberg
5019b709ba service/migration_manager: Simplify verb unregistration
You can safely unregister verbs even if they're not registered yet.
Simplify code in migration manager by dropping the redundant checks.
Message-Id: <1458027669-6517-1-git-send-email-penberg@scylladb.com>
2016-03-22 15:24:55 +02:00
Asias He
93015bcc54 migration_manager: Make the migration callbacks runs inside seastar thread
At the momment, the callbacks returns void, it is impossible to wait for
the callbacks to complete. Make the callbacks runs inside seastar
thread, so if we need to wait for the callback, we can make it call
foo_operation().get() in the callback. It is easier than making the
callbacks return future<>.
2016-03-15 15:41:23 +08:00
Pekka Enberg
1429213b4c main: Defer migration manager RPC verb registration after commitlog replay
Defer registering migration manager RPC verbs after commitlog has has
been replayed so that our own schema is fully loaded before other other
nodes start querying it or sending schema updates.
Message-Id: <1457971028-7325-1-git-send-email-penberg@scylladb.com>
2016-03-14 18:03:16 +01:00
Tomasz Grabiec
8deb3f18d3 query_processor: Invalidate prepared statements when columns change
Replicates https://issues.apache.org/jira/browse/CASSANDRA-7910 :

"Prepare a statement with a wildcard in the select clause.
2. Alter the table - add a column
3. execute the prepared statement
Expected result - get all the columns including the new column
Actual result - get the columns except the new column"
2016-01-11 10:34:55 +01:00
Tomasz Grabiec
8817e9613d migration_manager: Simplify notifications
Currently the notify_*() method family broadcasts to all shards, so
schema merging code invokes them only on shard 0, to avoid doubling
notifications. We can simplify this by making the notify_*() methods
per-instance and thus shard-local.
2016-01-11 10:34:54 +01:00
Tomasz Grabiec
e1e8858ed1 service: Fetch and sync schema 2016-01-11 10:34:53 +01:00
Tomasz Grabiec
dee0bbf3f3 migration_manager: Introduce merge_schema_from() 2016-01-11 10:34:52 +01:00
Asias He
bb1470f0d4 migration_manager: Introduce is_ready_for_bootstrap
This compares local schema version with other nodes in the cluster.
Return true if all of them match with each other.
2015-11-18 10:46:06 +02:00
Pekka Enberg
87d45cc58a service/migration_manager: Simplify notify_drop_keyspace()
There's no need to pass keyspace_metadata to notify_drop_keyspace()
because all we are interested in is the name. The keyspace has been
dropped so there's not much we could do with its metadata either.

Simplifies the next patch that wires up drop keyspace notification.

Signed-off-by: Pekka Enberg <penberg@scylladb.com>
2015-10-08 13:10:48 +02:00
Avi Kivity
d5cf0fb2b1 Add license notices 2015-09-20 10:43:39 +03:00
Pekka Enberg
99a80050e3 db: Rename legacy_schema_tables to schema_tables
There's nothing legacy about it so rename legacy_schema_tables to
schema_tables. The naming comes from a Cassandra 3.x development branch
which is not relevant for us in the near future.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-08-05 13:56:47 +03:00
Pekka Enberg
dd9d178502 service/migration_manager: Rename MIGRATION_DELAY_IN_MSEC
Rename "MIGRATION_DELAY_IN_MSEC" to "migration_delay" as the unit of
time is already clear from the type.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-08-05 13:31:46 +03:00
Pekka Enberg
feb6b7d316 service/migration_manager: Remove storage proxy arguments
Use get_storage_proxy() and get_local_storage_proxy() helpers under the
hood to simplify migration manager API users.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-08-05 13:31:46 +03:00
Pekka Enberg
a49e16a762 service/migration_manager: Remove ifdef'd code
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-08-05 13:16:45 +03:00
Pekka Enberg
12d99bd282 service/migration_manager: Migration listener hooks
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-08-05 11:50:51 +03:00
Pekka Enberg
a3c95235e6 migration_manager: Make stateful with sharded<>
In preparation for adding listener state to migration manager, use
sharded<> for migration manager.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-08-04 11:23:23 +03:00
Pekka Enberg
55858137e0 utils: Clean up runtime::get_uptime() API
Return a std::chrono::steady_clock::duration and switch the caller in
migration manager to also use proper C++ durations.

Reviewed-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-07-22 14:56:52 +03:00
Pekka Enberg
f1d5b9c4ae service/migration_manager: Convert scheduleSchemaPull() to C++
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-07-22 13:08:18 +03:00
Pekka Enberg
c090ac076f service/migration_manager: Convert passiveAnnounce() to C++
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-07-16 14:53:31 +03:00
Pekka Enberg
a64eab772c migration_manager: Convert announceColumnFamilyDrop to C++ as stub
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-07-09 09:22:02 +03:00
Pekka Enberg
386792e63f migration_manager: Convert announceKeyspaceDrop to C++ as stub
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-07-08 18:40:30 +02:00
Pekka Enberg
9cc9cf1e76 service/migration_manager: Announce schema mutations in cluster
Announce schema mutations in a cluster via the DEFINITIONS_UPDATE verb
and pass them to merge_schema() at endpoints.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-07-07 16:48:41 +03:00
Gleb Natapov
a338407e29 make storage_proxy object distributed
storage_proxy holds per cpu state now to track clustering, so it has to
be distributed otherwise smp setup does not work.
2015-06-17 15:14:06 +02:00
Calle Wilund
5d32364e34 Migration manager: add placeholder method for announce_column_family_update 2015-06-03 10:13:53 +02:00
Pekka Enberg
2814a65f9c migration_manager: Implement announce_new_column_family() variant
Convert ifdef'd announce_new_column_family() variant by specifying a
default argument.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-05-19 17:04:30 +03:00
Pekka Enberg
cf9677fa6f migration_manager: Unify announce_new_keyspace() functions
Use default arguments to unify two announce_new_keyspace() variants.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-05-19 17:03:27 +03:00
Pekka Enberg
079d806554 migration_manager: Move implementation to separate file
Move the implementation from header file to a source file.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-05-19 16:58:44 +03:00
Pekka Enberg
1284211d30 migration_manager: Remove obsolete Java imports
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-05-19 16:48:40 +03:00
Pekka Enberg
8380df84b4 database: Rename ks_meta_data to keyspace_metadata
Follow the naming convention set by user_types_metadata and rename
ks_meta_data to keyspace_metadata.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-05-19 11:24:06 +03:00
Pekka Enberg
032af4d53b database: Move ks_meta_data definition to database.hh
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-05-19 11:03:28 +03:00
Pekka Enberg
5b409baa99 db: Return a vector of mutations for 'create keyspace'
Origin supports chaining multiple mutations but we don't. Therefore,
return a vector of mutations for 'create keyspace'.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-04-27 10:38:11 +03:00
Pekka Enberg
d0fef3e31b db: Apply mutations in legacy_schema_tables::merge_schema()
Pass a reference to storage_proxy and apply mutations in
legacy_schema_tables::merge_schema().

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-03-26 13:33:48 +02:00
Pekka Enberg
5dfe06d5f1 service: Convert MigrationManager to C++, take 2
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-03-26 13:33:48 +02:00
Pekka Enberg
49fbe52088 service: Convert MigrationManager.announceNewColumnFamily to C++
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-03-24 15:02:33 +02:00
Pekka Enberg
bcb6c1b9c3 service: Convert MigrationManager to C++
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-03-12 10:29:51 +02:00