Commit Graph

1660 Commits

Author SHA1 Message Date
Tomasz Grabiec
90604df376 cql3: Move method definition to the source file 2015-02-09 10:28:43 +01:00
Tomasz Grabiec
754976bbec cql3: Convert ParsedUpdate 2015-02-09 10:28:43 +01:00
Tomasz Grabiec
87597ba3a4 cql3: Fix typo in process_where_clause() 2015-02-09 10:28:43 +01:00
Tomasz Grabiec
ef7ce1406f cql3: Make column_identifier ostream-printable 2015-02-09 10:28:41 +01:00
Tomasz Grabiec
73f1c6cb44 cql3: Make name accessors return sstring ref instead of value
To avoid unnecessary copies.
2015-02-09 10:28:10 +01:00
Tomasz Grabiec
987cdaa6cb cql3: Optimise includes 2015-02-09 10:28:09 +01:00
Tomasz Grabiec
12af207219 cql3: Add missing virtual/override 2015-02-09 10:28:09 +01:00
Tomasz Grabiec
208fdfab45 cql3: Move methods from header to source file 2015-02-09 10:28:09 +01:00
Tomasz Grabiec
852afdfb3c validation: Add missing include 2015-02-09 10:28:09 +01:00
Tomasz Grabiec
295fca1c71 Merge remote-tracking branch 'dev/penberg/cql-for-tomek' 2015-02-09 10:12:44 +01:00
Tomasz Grabiec
911c514a70 Merge branch 'master' of github.com:cloudius-systems/seastar 2015-02-09 10:11:15 +01:00
Asias He
f0c1bcdb33 tcp: Switch to debug print for persist timer
It is a left over during development.
2015-02-09 10:58:16 +02:00
Asias He
a192391ac6 tcp: Init timer callback using constructor 2015-02-09 10:58:15 +02:00
Asias He
0ac0e06d32 packet: Linearize after merge
The packet will be merged with the old packet anyway. Linearize after
the merge.
2015-02-09 10:58:15 +02:00
Raphael S. Carvalho
bf41da8974 core: small optimization when constructing std::vector<cpu>
Size of std::vector<cpu> can be pre-determined, then let's reserve memory ahead
of time so that push back calls would be optimized.

Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
2015-02-08 19:05:45 +02:00
Avi Kivity
7a704f7a40 sstring: fix truncation in compare()
If the difference between the sizes of the two strings is larger than can
be represented by an int, truncation will occur and the sign of the result
is undefined.

Fix by using explicit tests and return values.
2015-02-08 11:41:22 +02:00
Pekka Enberg
9a55e9fd22 sstring: Add 'compare' and 'operator<'
Add string comparison functions to basic_sstring that are required for
C++ containers such as std::map and std::multimap.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-02-08 11:12:31 +02:00
Pekka Enberg
fc7cb5ab5e shared_ptr: Fix assignment of polymorphic types
Fix the assignment operator to work with polymorphic types.

Suggested by Nadav.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-02-08 10:24:21 +02:00
Tomasz Grabiec
f948ee79bd test.py: Add --name filtering option 2015-02-08 10:09:29 +02:00
Tomasz Grabiec
ead03f1b08 test.py: Add --mode parameter for filtering tests 2015-02-08 10:09:29 +02:00
Avi Kivity
4b28eb638f Merge branch 'asias/tcp_v1' of github.com:cloudius-systems/seastar-dev
tcp queue from Asias: "Contains both fixes and improvemnts".
2015-02-07 20:20:57 +02:00
Raphael S. Carvalho
2195f77879 memcached: stats: rename evicted to evictions
Change for compliance with stock memcached.

Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
2015-02-07 19:57:19 +02:00
Nadav Har'El
a9ef189a54 core: add support for enum types as hash-table keys
This patchs adds a header file, "core/enum.hh"; Code which includes
this header file will be able to use an enumerated type as the key in a
hash table.

The header file implements a hash function for *all* enumerated types,
by using the standard hash function of the underlying integer type.
2015-02-07 12:33:48 +02:00
Pekka Enberg
c3c449de0c cql3/Cql.g: Initial selectStatement conversion to C++
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-02-06 10:46:12 +02:00
Pekka Enberg
6eaf90c9d6 cql3/Cql.g: Convert columnFamilyName to C++
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-02-06 10:46:12 +02:00
Pekka Enberg
19695f6994 cql3/Cql.g: Convert unreserved_keyword to C++
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-02-06 10:46:12 +02:00
Pekka Enberg
d381eb63e4 cql3/Cql.g: Convert ident to C++
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-02-06 10:46:12 +02:00
Pekka Enberg
0fd3f9f53d cql3/Cgl.g: Convert intValue to C++
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-02-06 10:46:12 +02:00
Pekka Enberg
ed45d19f72 cql3: Add std::hash for column_identifier
It's needed for unordered_map.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-02-06 10:46:12 +02:00
Pekka Enberg
d895a5768b cql3: Convert RawSelector to C++
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-02-06 10:46:12 +02:00
Pekka Enberg
b98d82190f cql3: Convert SelectStatement to C++
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-02-06 10:46:12 +02:00
Pekka Enberg
bb981d4603 cql: Plug in ANTLR-generated CQL parser
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-02-06 10:06:01 +02:00
Pekka Enberg
c77b00b7d8 cql3: Convert top-level 'query' rule to C++
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-02-06 10:06:01 +02:00
Pekka Enberg
34018b2b65 shared_ptr: Fix assignment of polymorphic types
Fix the assignment operator to work with polymorphic types.

Suggested by Nadav.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-02-06 10:06:01 +02:00
Pekka Enberg
a6356bd55e cql: Use sstring instead of std::string
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-02-06 10:06:01 +02:00
Pekka Enberg
4732653538 basic_sstring: Add 'compare' and 'operator<'
Add string comparison functions to basic_sstring that are required for
C++ containers such as std::map and std::multimap.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-02-06 10:06:01 +02:00
Asias He
abd5a24354 tcp: Implement persist timer
It is used to recover from a race where the sender is waiting for a
window update and the receiver is waiting for the sender to send more,
because somehow the window update carried in the ACK packet is not seen
by the sender.
2015-02-05 17:52:32 +08:00
Asias He
6a468dfd3d packet: Linearize more in packet_merger::merge
This fix tcp_server rxrx test on DPDK. The problem is that when we
receive out of order packets, we will hold the packet in the ooo queue.
We do linearize on the incoming packet which will copy the packet and
thus free the old packet. However, we missed one case where we need to
linearize. As a result, the original packet will be held in the ooo
queue. In DPDK, we have fixed buffer in the rx pool. When all the dpdk
buffer are in ooo queue, we will not be able to receive further packets.
So rx hangs, even ping will not work.
2015-02-05 17:52:32 +08:00
Asias He
4f21d500cb tcp: Do nothing if already in CLOSED state when close
This fix the following:

Server side:
$ tcp_server

Client side:
$ go run client.go -host 192.168.66.123 -conn 10 -test txtx
$ control-c

At this time, connection in tcp_server will be in CLOSED state (reset by
the remote), then tcp_server will call tcp::tcb::close() and wait for
wait_for_all_data_acked(), but no one will signal it. Thus we have tons
of leaked connection in CLOSED state.
2015-02-05 17:52:32 +08:00
Asias He
dd741d11b8 tcp: Fix FIN is not sent in some cases
We call output_one to make sure a packet with FIN is actually generated
and then sent out. If we only call output() and _packetq is not empty,
in tcp::tcb::get_packet(), packet with FIN will not be generated, thus
we will not send out a FIN.

This can happen when retransmit packets have been queued into _packetq,
then ACK comes which ACK all of the unacked data, then the application
call close() to close the connection.
2015-02-05 17:52:32 +08:00
Asias He
f600e3c902 tcp: Add queued_len
Take the number of queued data into account when checking if all
the data is sent.
2015-02-05 17:52:32 +08:00
Asias He
fca74f9563 tcp: Implement RFC6582 NewReno
We currently have RFC5681, a.k.a Reno TCP, as the congestion control
algorithms: slow start, congestion avoidance, fast retransmit, and fast
recovery. RFC6582 describes a specific algorithm for responding to
partial acknowledgments, referred to as NewReno, to improve Reno.
2015-02-05 17:45:48 +08:00
Asias He
426938f4ed tcp: Add Limited Transfer per RFC3042 and RFC5681
When RFC3042 is in use, additional data sent in limited transmit MUST
NOT be included in this calculation to update _snd.ssthresh.
2015-02-05 17:05:00 +08:00
Asias He
2289b03354 httpd: Fix RST handling
I found wrk sometimes sends RST instead a FIN to close a connection. In
this case, we will reset the connection and go to CLOSED state. However
httpd will not delete this, so we will have leaked connections in CLOSED
state.

Fix by handling the exception and sending an empty response as we do in
EOF case. Here we do not pass the exception to upper layer again,
otherwise httpd will be very noise.
2015-02-05 16:57:58 +08:00
Tomasz Grabiec
5a95524af0 Merge branch 'tgrabiec/cql3' from git@github.com:cloudius-systems/seastar-dev.git
CQL3 Conversions and fixes.
2015-02-05 09:55:08 +01:00
Tomasz Grabiec
bad22fe50e cql3: Convert ModificationStatement.Parsed.prepare()
Together with ParsedInsert descendant.
2015-02-04 10:29:05 +01:00
Tomasz Grabiec
89f924f9f9 cql3: Convert parts of SingleColumnRestriction 2015-02-04 10:29:05 +01:00
Tomasz Grabiec
86895390b8 cql3: Stub column_condition::prepare() 2015-02-04 10:29:05 +01:00
Tomasz Grabiec
af26be3e30 cql3: Expose base constructor in constants::setter 2015-02-04 10:29:05 +01:00
Tomasz Grabiec
25a435e398 cql3: Convert Operation::SetValue
I put it in a separate header, operation_impl.hh, to avoid cyclic
dependency between operation.hh and constants.hh.
2015-02-04 10:29:05 +01:00