Commit Graph

4439 Commits

Author SHA1 Message Date
Pekka Enberg
480200f0ea cql3: Enable truncate statement grammar definition
Truncate statement AST class is converted to C++ (although its
functionality is unimplemented). Enable the CQL grammar definition so
that users get an "not implemented" error instead of a syntax error.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-07-06 10:07:20 +03:00
Glauber Costa
5044e5191d gate: use with_gate idiom
Aside from guaranteeing that we will always leave correctly, it will also
allow us to change the implementation of the enter / leave pair without
disrupting existing code.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-07-05 19:18:34 +03:00
Avi Kivity
e0d0a7223b Merge seastar upstream 2015-07-05 19:11:51 +03:00
Glauber Costa
a4a23f8eb0 gate: introduce with_gate idiom
Execute a function making sure it is wrapped in a gate.

This can afford to be considerably simpler than do_with, since we are not
playing any games with object creation, and the gate itself can be assumed to
be relatively long lived.

Among other things, this will allow us to make changes to enter / leave without
breaking existing code, and experiment with stronger ways of doing leave - as
Avi suggested recently.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-07-05 19:07:08 +03:00
Avi Kivity
1f005f4a4a Merge "consistency_level.hh leftovers" from Vlad
"Implement the rest of the missing code in the currently used part of
a consistency_level.hh."
2015-07-05 17:51:49 +03:00
Avi Kivity
b67cded40d tests: print error code for failed test 2015-07-05 17:50:53 +03:00
Avi Kivity
3aebcfe6b7 Merge "Adding the column family metrics API" from Amnon
"The column family matrics is a set of data related to the column family.

This series adds an API based on the ColumnFamilyMetrics mbean.
It has a stub implementation, just so the JMX proxy would get a response."
2015-07-05 17:36:58 +03:00
Vlad Zolotarov
45ce351f60 db: consistency_level.hh: added is_sufficient_live_nodes()
Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
2015-07-05 17:34:56 +03:00
Vlad Zolotarov
501737cb84 db: consistency_level.hh: Complete the implementation of filter_for_query()
Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>

New in v2:
   - Use std::partition_copy() and boost::range::algorithm::partition().
   - Don't use std::move() when returning a local vector variable.
2015-07-05 17:34:50 +03:00
Avi Kivity
8fa053c7c6 Merge "Adding the hinted_handoff API" from Amnon
"This series adds the hinted handoff and hinted handoff metrics API with a stub
implementation.  The API definition was based on the HintedHandOffMetricsMBean
and the HintedHandoffMetrics."

Conflicts:
	api/api.cc
	configure.py
2015-07-05 17:33:25 +03:00
Avi Kivity
b8f8f66e81 Merge "Adding the endpoint_snitch_api" from Amnon
"This series adds the endpoint snitch api. It is based on the
EndpointSnitchInfoMBean definition."

Conflicts:
	api/api.cc
	configure.py
2015-07-05 17:31:23 +03:00
Vlad Zolotarov
a9a3bd1927 db: consistency_level.hh: Styling in filter_for_query()
- Make live_endpoints.erase() call more readable.
   - Adjust the comments to our naming.

Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
2015-07-05 17:15:23 +03:00
Avi Kivity
dedb9e8434 Merge "Adding the cache service metrics API" from Amnon
"This series adds the cache service metrics API, It is based on the CacheMetrics
definitions.

There are statistics on per key, row and counters that will be expose in the
API.  This series contain a stub implementation, that returns the correct types
but with a stub value."
2015-07-05 16:45:43 +03:00
Avi Kivity
5a110dc2ab Merge "Adding the compaction_manager API" from Amnon
"This series adds the compaction_manager that is based on the
CompactionManagerMBean and its metrics that is based on the CompactionMetrics.
It contain a stub implementation so that the API can be accessed from the JMX
API.

The doc file can be found:
/api-doc/compaction_manager/"
2015-07-05 16:44:36 +03:00
Amnon Heiman
3b4ce5a219 API: Adding a stub implementation for hinted_handoff metrics
This adds a stub implementation for the hinted handoff metrics.
The stubbed methods return the correct type, but with a stub value.
After this patch the following path will be available:
/hinted_handoff/metrics/create_hint/{addr}
/hinted_handoff/metrics/not_stored_hints/{addr}

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-07-05 16:42:54 +03:00
Amnon Heiman
a162528227 API: Adding metrics to hinted_handoff
This adds the metrics to hinted_handoff, the metrics is based on the
HintedHandoffMetrics definition.

The following commands were added:
get_create_hint_count
get_not_stored_hints_count

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-07-05 16:30:30 +03:00
Amnon Heiman
daceaec74c Adding a stub implementation for the hinted_handoff
This adds a stub implementation for the hinted handoff.
The API returns the currect type but with stubed values.

After applying this patch the api-doc will be available at:
/api-doc/hinted_handoff/

The following url will be available:
/hinted_handoff/hints
/hinted_handoff/schedule
/hinted_handoff/pause

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-07-05 16:30:30 +03:00
Amnon Heiman
389430b3da API: Adding the hinted_handoff swagger definition
This adds the swagger definition file for the hinted_handoff.
The API is based on the HintedHandOffMBean definition.

It adds the following command:
st_endpoints_pending_hints
truncate_all_hints
schedule_hint_delivery
pause_hints_delivery

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-07-05 16:30:24 +03:00
Calle Wilund
72ebb6360f modification_statement bugfix: don't move out of shared pointer in loop 2015-07-05 16:04:41 +03:00
Calle Wilund
abe3851376 Move memtable in_flight_seal.leave() to finally (symmetry) 2015-07-05 16:04:40 +03:00
Amnon Heiman
0cb5e665c9 Add submodule comment to README-urchin 2015-07-05 15:47:47 +03:00
Gleb Natapov
e5ab062f05 messaging: fix vector serialization
Hold on U with do_with since having it in capture is incorrect in case
lambda is moved.
2015-07-05 11:58:08 +03:00
Avi Kivity
901b2630ad Merge "Refactor mutation_partition_serializer interface" from Tomasz
"This series makes necessary changes for the serializer to be reusable for
serializing multiple mutations."
2015-07-05 11:44:02 +03:00
Takuya ASADA
15d009d39e udp: auto close on destruction of channel
Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com>
2015-07-05 11:30:08 +03:00
Tomasz Grabiec
37176e28a4 mutation_partition_serializer: Add read() variants 2015-07-04 13:46:31 +02:00
Tomasz Grabiec
f537c0f0ac mutation_partition_serializer: Refactor the interface
write() will now write framing information. It will be needed when
serializing many mutations. The old version was left as
write_without_framing().

This change also makes the serializer interface closer to that of
db::serializer<>. To write an object, the serializer instance is
instantiated with the object and remembers the size, so that size
calculation doesn't have to be repeated again for write().
2015-07-04 13:46:31 +02:00
Tomasz Grabiec
48d2c96b3c db/serializer: Introduce write() which works with bytes_ostream 2015-07-04 13:46:31 +02:00
Tomasz Grabiec
72a6f80ce5 bytes_ostream: Introduce write_place_holder() for arbitrary size 2015-07-04 13:46:31 +02:00
Tomasz Grabiec
01c698def4 mutation_reader: Make consume() work with deferring callbacks too 2015-07-03 12:38:36 +02:00
Tomasz Grabiec
59a95f8237 Merge branch 'pdziepak/ttl/v4' from seastar-dev.git
Proper TTL handling from Pawel:

"These patches add support for expiring cells (i.e. the ones with TTL set).
is_live() and is_dead() member functions of atomic cell now take current
timestamp as argument and return appropriate value depending on whether
the cell has expired or not. In order to avoid partially expired rows
timestamp of a request is appropriately propagated"
2015-07-02 19:06:29 +03:00
Paweł Dziepak
36e1fdcff4 tests/cql_query: test expiring cells
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-02 17:26:26 +02:00
Paweł Dziepak
b211bfa514 gc_clock: support adding an offset to the current time
This, intended for tests, feature allows testing time related event without
need for real time waits.

Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-02 17:26:22 +02:00
Paweł Dziepak
7dbcdb4a9e atomic_cell_base: remove unused function is_dead()
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-02 17:26:18 +02:00
Paweł Dziepak
16963b214b sstables: do not write expired cells
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-02 17:26:14 +02:00
Paweł Dziepak
dc23574580 tests/sstable: use 0 as current timestamp
For simplicity in expiration time computations 0 is used as current
timestamp, make sure that sstable write code is aware of that and
doesn't consider cells as already expired.

Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-02 17:26:10 +02:00
Paweł Dziepak
8fa0049cae sstables: keep current timestamp
Current timestamp will be used to filter out expired cells.

Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-02 17:26:06 +02:00
Paweł Dziepak
183b6fc6d9 db: do not return already expired cells in queries
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-02 17:25:41 +02:00
Paweł Dziepak
61aae4a278 atomic_cell: add checks for expired cells
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-02 17:01:19 +02:00
Paweł Dziepak
290a7ca1bf query: add timestamp to read_command
Read command needs a timestamp in order to determine which cells have
already expired.

Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-02 17:01:19 +02:00
Paweł Dziepak
9992795a5c atomic_cell: move common logic to atomic_cell_base
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-02 16:47:18 +02:00
Amnon Heiman
ff4da7fcdc Adding the endpoint_snitch API implementation
This adds the implementation for the API endpoint_snitch
After this patch the API doc can be found at:
/api-doc/endpoint_snitch_info/

The following url are available:
/snitch/datacenter
/snitch/rack

The get name is stubed
/snitch/name

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-07-02 17:45:23 +03:00
Amnon Heiman
3a43a61203 Adding the Swagger definition of the endpoint_snitch_info
This adds the Swagger definition for the endpoint_snitch_info that is
based on the EndpointSnitchInfoMBean.
The following commands where added:
get_datacenter
get_rack
get_snitch_name

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-07-02 17:44:05 +03:00
Avi Kivity
b0fd850463 Merge "Code missing for a NetworkTopologyStrategy integration" from Vlad
"This series add a code missing for an integration of a NetworkTopologyStrategy
with a current clustering WRITE path."
2015-07-02 17:31:49 +03:00
Avi Kivity
1eabf5983f Merge seastar upstream 2015-07-02 17:07:04 +03:00
Gleb Natapov
d0003e4f29 rpc: handler smart pointer return value from rpc handler
Currently if rpc handler returns smart pointer rpc will try to serialize
the pointer object as opposite to an object the ptr is pointing to.
This patch fixes it by serializing real object instead of a pointer.
2015-07-02 16:46:23 +03:00
Gleb Natapov
7d33cf62a5 Add is_smart_ptr metafunction to detect know smart pointers objects 2015-07-02 16:46:23 +03:00
Avi Kivity
4ef3eaef4d Merge "Add tests for query interface on mutation level" from Tomasz 2015-07-02 16:35:27 +03:00
Vlad Zolotarov
89a7e84483 service: storage_proxy: implement datacenter_sync_write_response_handler
Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
2015-07-02 16:00:47 +03:00
Vlad Zolotarov
4a78d173f6 service: storage_proxy::send_to_live_endpoints(): properly query a datacenter name
Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
2015-07-02 16:00:47 +03:00
Vlad Zolotarov
acb8b9fcda service: storage_proxy::mutate(): properly query local_dc
Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
2015-07-02 16:00:47 +03:00