Commit Graph

3092 Commits

Author SHA1 Message Date
Tomasz Grabiec
b28d26bc9f murmur_hash: Drop static qualifier from template definition
To avoid multiple definitions in different compilation units. Pointed
out by Avi.
2015-04-30 16:49:50 +02:00
Tomasz Grabiec
d54388e1f6 compound_compat: Remove leftover code
It's a remnant after failed experiment. I forgot to drop it.
2015-04-30 15:40:02 +02:00
Tomasz Grabiec
6c008d825c tests: Add partitioner test to test.py 2015-04-30 15:39:57 +02:00
Tomasz Grabiec
93aab46406 tests: Fix murmur_hash_test 2015-04-30 14:23:24 +02:00
Avi Kivity
4d1ba11668 Merge branch 'tgrabiec/fix-decorated-key-order' of github.com:cloudius-systems/seastar-dev into db
Fix decorated_key ordering to match Origin's, from Tomasz.
2015-04-30 14:54:35 +03:00
Tomasz Grabiec
72c327b02f tests: Add partitioner test 2015-04-30 12:02:39 +02:00
Tomasz Grabiec
aec740f895 db: Make decorated_key have ordering compatible with Origin 2015-04-30 12:02:39 +02:00
Tomasz Grabiec
359af7745c dht: murmur3_partitioner: move get_token() implementation to .cc 2015-04-30 11:16:53 +02:00
Tomasz Grabiec
51d26620ca db: Remove comment above partitions map
I think the types are explicit enough now.
2015-04-30 11:16:53 +02:00
Tomasz Grabiec
46e72cbc64 tests: Introduce perf_hash.cc, hashing benchmark
Output on my laptop:

$ build/release/tests/perf/perf_hash
Timing fixed hash...
28671657.15 tps
28720930.45 tps
28622017.20 tps
28677088.01 tps
29223543.70 tps
Timing iterator hash...
22023042.57 tps
21953352.04 tps
21393787.05 tps
21613837.10 tps
21563284.57 tps
2015-04-30 11:16:53 +02:00
Tomasz Grabiec
ce78aef19a tests: Introduce murmur_hash_test.cc 2015-04-30 11:16:53 +02:00
Tomasz Grabiec
5fc149d454 utils: murmur_hash: Add input iterator based hash3_x64_128() version 2015-04-30 11:16:53 +02:00
Tomasz Grabiec
9197914697 utils: Fix indentation in murmur_hash.hh
We don't indent namespaces.
2015-04-30 11:16:53 +02:00
Tomasz Grabiec
ad05bb92d1 compound: Add compound::is_prefixable 2015-04-30 11:16:53 +02:00
Tomasz Grabiec
71e580c9c6 tests: keys: Add compatibility layer tests 2015-04-30 11:16:52 +02:00
Tomasz Grabiec
82882779b6 keys: Expose compatibility layer with Origin in partition_key 2015-04-30 11:16:52 +02:00
Tomasz Grabiec
e7c282fdf2 tests: Add tests for compound adaptors 2015-04-30 11:16:52 +02:00
Tomasz Grabiec
89dca2eee4 compound: Introduce legacy format adaptors 2015-04-30 11:16:52 +02:00
Tomasz Grabiec
c78b2b1e0d compound: Introduce components() method 2015-04-30 11:16:52 +02:00
Tomasz Grabiec
7d45a472aa compound: Implement iterator::operator->() 2015-04-30 11:16:52 +02:00
Tomasz Grabiec
6f536382b8 compound: Mark and document component iterator as InputIterator 2015-04-30 11:16:52 +02:00
Tomasz Grabiec
6a9c49ee47 compound: Implement postfix incrementation in the component iterator 2015-04-30 11:16:52 +02:00
Tomasz Grabiec
8d2233fb33 compound: Add method for checking if type is compound or not
Will be used by legacy comparator.
2015-04-30 11:16:52 +02:00
Tomasz Grabiec
08a17496a3 keys: Move get_component() to compound_wrapper
It's an operation which is valid for any compound, not only
partition_key.
2015-04-30 11:16:52 +02:00
Tomasz Grabiec
0559062893 types: Introduce lexicographical_tri_compare() 2015-04-30 11:16:52 +02:00
Tomasz Grabiec
b28ded72eb Merge branch 'dev/penberg/query-local-fixes' from seastar-dev.git
Cleanups from Pekka.
2015-04-30 10:12:27 +02:00
Pekka Enberg
26dd7c7cac service: Avoid schema ID lookup in storage_proxy::query_local()
It's unneeded because we already looked up the schema. Spotted by Tomek.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-04-30 10:15:45 +03:00
Pekka Enberg
73928c27a5 service: Fix storage_proxy::query_local() to return static columns
Spotted by Tomek.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-04-30 10:14:51 +03:00
Pekka Enberg
3e605f1c8c service: Fix storage_proxy::query_local() to return clustering keys
Spotted by Tomek.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-04-30 10:14:47 +03:00
Avi Kivity
2dda4673a3 Merge branch 'calle/cassandra-config' of github.com:cloudius-systems/seastar-dev into db
Configuration support, from Calle:

* Config object reading cassandra.yaml + command line opts.
* Tracks config source (none, cmd line, yaml)
* Added to main + database
* Used with commit log
2015-04-29 19:25:37 +03:00
Calle Wilund
2f4e7a00f6 Use db/config object in main, database etc
* Uses config object to augument/impl options parsing
* Database now holds config obj
* Commitlog can now be inited with global config obj.
2015-04-29 18:01:17 +02:00
Calle Wilund
5054892657 Cassandra compatible "config" object
* Based on the property set of cassandra 2.1
* Structure mapping all "known" cassandra.yaml config properties
* YAML and command line parsing of opts.
* Tracks is-set? and set-from-where?
* Uses giant macros to make Avi happy.
2015-04-29 17:00:15 +02:00
Calle Wilund
63ea446849 Collectd: Use initializer lists + declare < and == operators for clang
Makes scollectd compile on clang++ 3.5.0
2015-04-29 17:00:14 +02:00
Avi Kivity
509d8a188e Merge branch 'cleanup-sst' of github.com:glommer/urchin into db
Sstable cleanup, from Glauber (privatize some functions).
2015-04-29 16:49:59 +03:00
Glauber Costa
34d099dfbf sstables: make read_summary_entry private
Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-04-29 09:47:19 -04:00
Glauber Costa
198f55dc5c sstables: don't expose summary binary search
There is no need to expose binary search. It can be an internal function
that is accessible for test only.

Also, in the end, the implementation of the summary version was such a simple
one, that there is no need to have a specific method for that. We can just pass
the summary entries as a parameter.

Some header file massage is needed to keep it compiling

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-04-29 09:47:19 -04:00
Glauber Costa
8ec9f162bb sstables: make read_index a private function
Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-04-29 09:47:19 -04:00
Avi Kivity
4593d52444 cql3: remove gunk from lists.hh 2015-04-29 16:31:36 +03:00
Tomasz Grabiec
2693dd2c7b db: Extract bytes related stuff from database.cc to bytes.cc
Some tests (eg murmur_hash_test) need only byte manipulation
functions. By specifying dependencies precisely we can drastically
reduce recompilation times, which speeds up development cycle.

I managed to reduce recompilation time for murmur_hash_test from 5
minutes to 4 seconds by breaking dependency on whole urchin object
set.
2015-04-29 15:50:16 +03:00
Avi Kivity
6290dee438 db: const correctness for abstract_type and friends
Types are immutable.
2015-04-29 15:40:38 +03:00
Avi Kivity
ab60ed8813 db: s/shared_ptr<abstract_type>/data_type/
Also replace derived types (map_type, collection_type, etc.).

As we'll change data_type's definition, this reduces the number of places
that need to be modified later, and is more readable.
2015-04-29 15:09:04 +03:00
Avi Kivity
257efda9d5 Merge branch 'master' of github.com:cloudius-systems/seastar into db 2015-04-29 12:40:08 +03:00
Avi Kivity
7071239f49 Merge branch 'master' of github.com:cloudius-systems/seastar 2015-04-29 12:34:15 +03:00
Avi Kivity
d45e0ebd4a tests: add shared_ptr tests for const support
Reviewed-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-04-29 12:32:54 +03:00
Avi Kivity
c952248dc5 shared_ptr: improve const support
Allow enable_shared_from_this<T>::shared_from_this() to return
a shared_ptr<const T> when called on a const object.

Reviewed-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-04-29 12:32:43 +03:00
Calle Wilund
03da7399a0 sstring: add iostream input (>>)
Signed-off-by: Calle Wilund <calle@cloudius-systems.com>
2015-04-29 11:34:47 +03:00
Avi Kivity
3162873d7f Merge branch 'calle/commitlog' of github.com:cloudius-systems/seastar-dev into db
Use commit log in database, from Calle:

"Initial" usage of the commitlog in database mutation path.
A commitlog is created in "work" dirs when initing the db
from a datadir. However, since we have neither disk data storage,
nor replay capability yet (and no real db config), the settings
are basically to just write in-memory serialization, write them to
disk and then discard them. So in fact, pointless. But at least using
the log...
2015-04-29 11:28:05 +03:00
Calle Wilund
aeb83f2874 Add commitlog to db + use it in storage_proxy/handler
* A commitlog is created in "work" dirs when initing the db
  from a datadir. However, since we have neither disk data storage,
  nor replay capability yet (and no real db config), the settings 
  are basically to just write in-memory serialization, write them to 
  disk and then discard them. So in fact, pointless. But at least using
  the log...
* Moved the actual "apply" of mutation into database. If a commitlog
  is active, add an entry to it before applying mutation.
2015-04-29 10:10:21 +02:00
Calle Wilund
07f1208926 Make commitlog respect max disk size setting. 2015-04-29 10:10:21 +02:00
Tomasz Grabiec
ac576bf1dc schema: Remove thrift_schema
It's not used for anything so it only causes confusion.
2015-04-29 10:21:40 +03:00