Commit Graph

4016 Commits

Author SHA1 Message Date
Asias He
04fa228091 streaming: Convert StreamEventHandler.java to C++ 2015-06-19 15:11:35 +08:00
Asias He
6707c9f8af streaming: Convert StreamEvent.java to C++ 2015-06-19 15:07:22 +08:00
Asias He
739cf1b3ef streaming: Add is_success() and plan_id() to stream_session 2015-06-19 15:07:06 +08:00
Asias He
4604ae7d4b streaming: Import ConnectionHandler.java 2015-06-19 14:23:14 +08:00
Asias He
ad81a5f0a9 streaming: Import StreamEventHandler.java 2015-06-19 14:22:50 +08:00
Asias He
ebc6d6166c streaming: Import StreamEvent.java 2015-06-19 14:22:30 +08:00
Asias He
c3ba169d64 streaming: Convert StreamCoordinator.java to C++ 2015-06-18 23:42:50 +08:00
Asias He
067108f094 streaming: Import StreamCoordinator.java 2015-06-18 23:42:50 +08:00
Asias He
5ed8f689f7 streaming: Add gossip callback 2015-06-18 23:42:50 +08:00
Asias He
0aa9fdff5d streaming: Convert SessionInfo.java to C++ 2015-06-18 23:02:31 +08:00
Asias He
8c3a32a3cf streaming: Import SessionInfo.java 2015-06-18 23:02:31 +08:00
Asias He
3f97d610f3 streaming: Add stream_session::state 2015-06-18 23:02:31 +08:00
Asias He
849519946e streaming: Convert ProgressInfo.java to C++ 2015-06-18 23:02:31 +08:00
Asias He
01d52f8bb1 streaming: Import ProgressInfo.java 2015-06-18 23:02:31 +08:00
Asias He
9e8512a783 streaming: Convert StreamPlan.java to C++ 2015-06-18 23:02:31 +08:00
Asias He
3e5aa7a3d5 streaming: Import StreamPlan.java 2015-06-18 23:02:31 +08:00
Avi Kivity
f221301d5e Merge "preparation work - system table handling" from Glauber 2015-06-18 17:49:29 +03:00
Avi Kivity
ce1e936d72 Merge "Cleanups around mutation reading" from Tomasz
"This series addresses two things:

  1) fixes a long standing problem with query::partition_range being modeled
  inappropriately. It worked on key values only, whereas partition ordering is
  determined by token and key. This will be needed by clustering code soon,
  which will split a full range into many slices based on token ring topology.

  2) refactors mutation reading code in preparation for adding row cache.
  mutation_reader merging was extracted to make_combined_reader(). sstables
  are now represented by a single mutation_reader."
2015-06-18 17:39:41 +03:00
Tomasz Grabiec
51cae834e3 db: Put all sstables behind single reader
This change abstracts reading from on-disk data sources behind a single
reader which is then composed with memtable readers. This change also
abstracts all data sources behind a single reader obtained via
column_family::make_reader(). That reader is then used by algorithms
like column_family::for_all_partitions() or
column_family::query(). Having those abstractions will make it easier
to add row cache, because it will be encapsulated in a single place.
2015-06-18 16:33:33 +02:00
Tomasz Grabiec
bc468f9a0e memtable: Make memtable inherit from enable_lw_shared_from_this 2015-06-18 15:48:21 +02:00
Tomasz Grabiec
a8fde0847e db: Fix too broad catch clause
The current handling, which ignores the future and a FIXME, should
apply only to the case when a table is missing.
2015-06-18 15:47:40 +02:00
Tomasz Grabiec
370712f741 tests: Add mutation_reader_test 2015-06-18 15:47:40 +02:00
Tomasz Grabiec
df0243d90e mutation_reader: Introduce simple reader adaptors
Useful for testing.
2015-06-18 15:47:40 +02:00
Tomasz Grabiec
96ab69d39d mutation_reader: Introduce make_combined_reader()
Based on column_family::for_all_partitions().
2015-06-18 15:47:40 +02:00
Tomasz Grabiec
b35bc8e75a mutation_reader: State monotonicy requirement in the interafce contract
Currently column_family::for_all_partitions() relies on monotonicity
of keys. Adding strict monotonicity requirement doesn't hurt
implementaitons, but makes some consumers simpler.
2015-06-18 15:47:40 +02:00
Tomasz Grabiec
7f1ff0401e db: Move mutation_reader definition to separate header 2015-06-18 15:47:40 +02:00
Tomasz Grabiec
3779506990 db: query: Make partition_range hold ring_position
Current model was not really correct because Origin doesn't support
querying of partition ranges by their value. We can query slices
according to dht::decorated_key ordering, which orders partitions
first by token then by key value.

ring_position encapsulates range constraint. Key value is optional, in
which case only token is constrained.
2015-06-18 15:47:40 +02:00
Tomasz Grabiec
0740f49599 query: range: Introduce transform() 2015-06-18 15:47:39 +02:00
Tomasz Grabiec
0c45deeadf cql3: statement_restrictions: move definitions to source file 2015-06-18 15:47:39 +02:00
Glauber Costa
4238ecffd3 sstables: make sure sstable directory exists
In theory, when we create a new column family, we should also make sure
that the underlying directory exist. However, this would be quite challenging:
there are a lot of entry points for, add_column_family, none of them are futurized,
and futurizing them could prove challenging up the call chain.

Because we can guarantee that the keyspace directory will exist - now that we
have unified that, it is actually a lot simpler to just make sure that the
directory exist when writing the sstable.

If the keyspace directory wouldn't exist we would have to recurse through the
path.  As previously said, this patch will assume this away.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-06-18 09:22:58 -04:00
Glauber Costa
2f5b1b642b database: be more forgiving with sstables parsing
Currently, Origin generates sstables in the form CF-UUID, where UUID
is a string of numbers.

We also do CF-UUID, but for us, UUID has dashes separating the UUID components.

Due to the current test, we fails to load our current sstables. That test
really isn't that important, since we are currently not doing anything with the
UUID. And if we were, we should be able to accept both formats anyway.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-06-18 09:22:20 -04:00
Glauber Costa
efc57ef65e create system directory if it doesn't exist
Because system keyspace is not created using the same way as the others - and
it would be hard to convert, due to the fact that it is created inside the
database constructor, make sure that it is created when the database boots.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-06-18 09:22:20 -04:00
Glauber Costa
057c38b61c only populate system keyspace
Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-06-18 09:22:20 -04:00
Glauber Costa
2a36eb7b6e cql_test_env: apply the vegas doctrine
"What happens in memory, stays in memory"

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-06-18 09:22:20 -04:00
Glauber Costa
e6090146e5 merge tables: properly generate column family config
We are currently generating an empty config, which is wrong and won't
propagate important characteristics of the keyspace.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-06-18 09:22:20 -04:00
Glauber Costa
a95a529865 database: allow for empty data file directories
A lot of our tests run in memory only, but now that our write path is complete,
we may start running into problems soon, as we write down the sstables.

It would be nice to force the database to run in-memory only in some situations.
Even in the real world, some scenarios may benefit from that in the future.

This patch forces durable_writes to be always false in case we force the data
directory to be an empty list.

For system tables, the patch also fixes a bug. Because system tables were
forceably initialized with durable_writes = false, we would never write them to
disk, even when we were supposed to.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-06-18 09:22:20 -04:00
Avi Kivity
5717869ffc Merge "streaming updates" from Asias 2015-06-18 15:49:07 +03:00
Gleb Natapov
d8dcceea09 stop storage and messaging services during exit 2015-06-18 15:13:02 +03:00
Gleb Natapov
89c74707d0 message: terminate all connections while stopping 2015-06-18 15:13:02 +03:00
Avi Kivity
8aa7e99051 Merge seastar upstream 2015-06-18 15:00:43 +03:00
Gleb Natapov
f7f445d563 distributed: deallocate _instance array during stop.
Otherwise tester may crash if _instances destructor is called when thread
responsible for the allocation (which tester spawned to run seastar in)
no longer running.
2015-06-18 14:43:38 +03:00
Gleb Natapov
46f47b7ea2 rpc: implement stop for server/client connection 2015-06-18 14:43:16 +03:00
Gleb Natapov
3c4dcd871a add default and move constructor/assignment to server_socket 2015-06-18 14:43:16 +03:00
Avi Kivity
8ec6826dca Merge "Enable snitch via config" from Shlomi 2015-06-18 13:46:09 +03:00
Avi Kivity
daa0009eaf Merge "add support to snappy and deflate compressors" from Raphael 2015-06-18 13:44:49 +03:00
Avi Kivity
7c68180d67 Merge "more streaming handlers" from Asias 2015-06-18 13:21:05 +03:00
Avi Kivity
27f332c315 Merge seastar upstream 2015-06-18 13:20:46 +03:00
Avi Kivity
e22e27a9ba build: fix spelling of _FORTIFY_SOURCE 2015-06-18 12:53:06 +03:00
Glauber Costa
92803a2db3 touch_directory: EEXIST-ignoring make directory
There are many situations in which we would like to make sure a directory
exists.  We can do that by creating the directory we want, and just ignoring
the relevant error.

It is a lot of code though, and I believe it is an idiom common enough to exist
on its own.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
Reviewed-by: Nadav Har'El <nyh@cloudius-systems.com>
2015-06-18 12:51:49 +03:00
Raphael S. Carvalho
534401c91f fstream: use dma_alignment constant instead of a hardcoded value
Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
2015-06-18 12:49:33 +03:00