Commit Graph

26 Commits

Author SHA1 Message Date
Avi Kivity
ebaeefa02b Merge seatar upstream (seastar namespace)
- introcduced "seastarx.hh" header, which does a "using namespace seastar";
 - 'net' namespace conflicts with seastar::net, renamed to 'netw'.
 - 'transport' namespace conflicts with seastar::transport, renamed to
   cql_transport.
 - "logger" global variables now conflict with logger global type, renamed
   to xlogger.
 - other minor changes
2017-05-21 12:26:15 +03:00
Pekka Enberg
14391a8ec8 cql3: Return change event from announce_migration()
This changes announce_migration() to return a change event directory in
schema_altering_statement base class. It's needed for drop index
statement, which does not know the keyspace or column family until it
looks up them based on the index. Two stage approach of announcing a
migration and then creating the change event won't work because in the
latter stage, the lookup will fail. The same change in
announce_migration() has been applied to Apache Cassandra.
2017-05-04 14:59:12 +03:00
Vlad Zolotarov
ff55b76562 cql3::query_processor: use weak_ptr for passing the prepared statements around
Use seastar::checked_ptr<weak_ptr<pepared_statement>> instead of shared_ptr for passing prepared statements around.
This allows an easy tracking and handling of statements invalidation.

This implementation will throw an exception every time an invalidated
statement reference is dereferenced.

Signed-off-by: Vlad Zolotarov <vladz@scylladb.com>
2017-04-12 12:24:03 -04:00
Vlad Zolotarov
7606588267 cql3::query_processor: add cql_stats
- Add cql_stats member.
   - Pass it to cql3::raw::parsed_statement::prepare() virtual method.

Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
2016-11-03 11:48:57 -04:00
Avi Kivity
2d961334d8 cql3: copy create_keyspace_statement when preparing it
To prepare for the separation of prepared and raw schema_altering_statements,
avoid the reliance this class implementing both the raw and prepared
variants and the use of shared_from_this().
2016-07-30 23:13:45 +03:00
Calle Wilund
3906dc9f0d cql3::statements: Change check_access to future<> + implement 2016-04-19 11:49:05 +00: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
d79d8b00f3 cql3: Move create_keyspace_statement class implementation to source file
Signed-off-by: Pekka Enberg <penberg@scylladb.com>
2015-10-23 16:17:17 +03:00
Takuya ASADA
f8ecd338b8 cql3: replace PRId32 with %d on sprint()
fixes #374

Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com>
2015-09-20 13:15:24 +03:00
Avi Kivity
d5cf0fb2b1 Add license notices 2015-09-20 10:43:39 +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
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
Avi Kivity
c84fc789c5 cql3: avoid use-after-free of stack variable in create_keyspace_statement
Capture it by value.
2015-07-21 12:19:19 +03:00
Paweł Dziepak
fe491ee5f5 cql3: make sure an exception is caught in create statements
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-16 16:23:39 +02:00
Paweł Dziepak
3806f0e268 cql3: validate the name of the created keyspace
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-06-23 16:17:45 +02: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
1631ce132e Add "storage_proxy&" argument to cql_statement::validate
To make db, schemas etc reachable
2015-06-03 10:13:52 +02: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
11b633208d cql3: Remove Java imports from C++ files
Remove left-over Java imports from files that are already translated to
C++.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-05-12 16:41:12 +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
5bab83b9e0 cql3: Switch to futurized migration_manager
Migration manager announce functions now return a future. Switch to the
new API in modification statements.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-03-26 13:33:48 +02:00
Pekka Enberg
22a6066730 Revert "cql3: Fix create_keyspace_statement::prepare()"
This reverts commit c72f5796c4. It is no
longer needed after commit 8628d98 ("shared_ptr: fix reference count
loss when creating a derived type with e_s_f_t").

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>

Conflicts:
	cql3/statements/schema_altering_statement.hh
2015-03-12 13:02:53 +02:00
Pekka Enberg
e1948dcc0c cql3: Convert create_keyspace_statement to C++, take 2
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-03-12 10:30:25 +02:00
Pekka Enberg
817486d27f cql3: Convert schema_altering_statement::execute() to C++
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-03-05 15:06:31 +02:00
Pekka Enberg
c72f5796c4 cql3: Fix create_keyspace_statement::prepare()
Move enable_shared_from_this to the concrete create_keyspace_statement
class to make sure prepare() instantiates the right type. Fixes "pure
virtual method called" errors when calling create_keyspace_statement
methods that are pure virtual in the base class.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-03-05 12:20:39 +01:00
Pekka Enberg
8e0903fdbd cql3: Convert statements.CreateKeyspaceStatement to C++
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-03-03 11:57:43 +02:00