Commit Graph

43077 Commits

Author SHA1 Message Date
Gleb Natapov
77bd21c387 net: implement bulk sending interface for proxy queue
Take advantage of the bulk interface to send several packets simultaneity
with one submit_to() to remote cpu.
2015-01-06 15:24:10 +02:00
Gleb Natapov
c98bdf5137 net: limit native udp send buffer size
Currently udp sender my send whenever it has data and if it does
this faster than packets can be transmitted we will run out of memory.
This patch limits how much outstanding data each native udp channel may
have.
2015-01-06 15:24:10 +02:00
Gleb Natapov
0fd014fc35 net: add add completion callback between l3 and l4
L4 will provide the callback to be called by L3 after the packet is
handled to lower layers for transmission. L4 will know that it can queue
more data from user at this point. The patch also change send function
that can no longer block to return void instead of future<>.
2015-01-06 15:24:10 +02:00
Gleb Natapov
e80fa4af7d net: drop top level 'remaining' from ipv4::send()
It is not needed.
2015-01-06 15:24:10 +02:00
Gleb Natapov
12bce3f4fc net: make interface get packets from l3
Instead of l3 (arp/ipv4) pushing packets into interface's queue, make
them register functions that interface can use to ask l3 for packets.
2015-01-06 15:24:10 +02:00
Gleb Natapov
e5d0adb339 net: make qp poll for tx packets from networking stack
Packets are accumulated in interface's packet queue. The queue is polled
by qp to see if there is something to send.
2015-01-06 15:24:10 +02:00
Gleb Natapov
865d95c0f1 net: provide bulk sending interface for qp
Implement it as calls to send() in a loop for now. Each device will
get proper implementation later.
2015-01-06 15:24:10 +02:00
Glauber Costa
974278203c db: add datadir to the database
This is the directory from which we will read the sstables.
Code to actually parse them will come later.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-01-06 14:54:47 +02:00
Gleb Natapov
3f483b22bc future: add missing std::forward() in do_until_continued() 2015-01-06 14:43:34 +02:00
Avi Kivity
e733c2a45a db: change abstract_type::deserialize to allow null objects
In some cases, deserialize() can return a null object (if there were zero
input bytes).

In others, it cannot (for string or blob types).

Change the return type to optional<any> and adapt the deserialiation code
to deal with it.
2015-01-06 12:49:47 +02:00
Asias He
04b8a6bf7d db: Convert db/CounterCell.java to C++ 2015-01-06 17:55:53 +08:00
Asias He
3d418e55ad db: Import db/CounterCell.java 2015-01-06 17:49:10 +08:00
Asias He
969f942613 db: Convert db/ExpiringCell.java to C++ 2015-01-06 17:46:40 +08:00
Asias He
4513e28e1b db: Import db/ExpiringCell.java 2015-01-06 17:42:15 +08:00
Asias He
49e7d79630 db: Convert db/DeletedCell.java to C++ 2015-01-06 17:40:49 +08:00
Asias He
50bdc5438f db: Import db/DeletedCell.java 2015-01-06 17:35:55 +08:00
Asias He
f4b40d3516 db: Convert db/CounterUpdateCell.java to C++ 2015-01-06 17:33:51 +08:00
Asias He
4ad91ece93 db: Import db/CounterUpdateCell.java 2015-01-06 17:23:46 +08:00
Asias He
5449d44f38 db: Convert db/Cell.java to C++ 2015-01-06 17:23:46 +08:00
Asias He
d11a39524f db: Import db/Cell.java 2015-01-06 17:23:46 +08:00
Asias He
516ef9e63b utils: Convert utils/FBUtilities.java 2015-01-06 17:23:46 +08:00
Asias He
3a5314bec8 utils: Import utils/FBUtilities.java 2015-01-06 16:59:16 +08:00
Avi Kivity
d5c9f66009 db: adjust abstract_type indentation 2015-01-05 15:56:29 +02:00
Avi Kivity
1fe6bf687d db: de-pimpl data_type
Since origin tends to cast around, we should allow that too, by exposing
the implementation type and using a shared_ptr instead of a value class.
2015-01-05 15:55:30 +02:00
Avi Kivity
82c4920f1c db: copy correct partition_key_type
Specify this-> so we use the variable we just moved into, rather than the
one we just moved from.
2015-01-05 14:03:47 +02:00
Avi Kivity
80408329e0 db: rename data types to conform to origin conventions 2015-01-05 13:48:38 +02:00
Avi Kivity
d5491f87c5 db: add abstract_type alias 2015-01-05 13:30:50 +02:00
Avi Kivity
efc868d1e6 db: extend data_type to be able to support dynamic types
Dynamic types come and go, so they need to be reference counted.

Switch data_type to using a shared_ptr<> for its implementation.

Since thread_ptr is not thread safe, the global primitive types must be
thread_local.
2015-01-05 13:26:56 +02:00
Avi Kivity
1b837160f1 thrift: drop unneeded using declaration 2015-01-05 13:26:55 +02:00
Avi Kivity
a63cf2e609 Merge branch 'master' into HEAD 2015-01-05 13:26:35 +02:00
Avi Kivity
66eea763bf shared_ptr: add comparison operators 2015-01-05 13:24:07 +02:00
Avi Kivity
7a317f78a2 shared_ptr: be friend to self
Needed for converting constructor.
2015-01-05 13:24:06 +02:00
Pekka Enberg
a78c5b46b2 cql3: Fix term::bind() type signature
The first argument is a synthetic this pointer that we require users to
pass around. Change it to shared_ptr<term> instead to make it accessible
to all callers.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-01-05 12:39:30 +02:00
Nadav Har'El
ae05652ec7 Utility functions for serializing primitive types
Cassandra uses the DataOutput / DataInput interfaces and related classes
(DataOutputPlus, DataOutputStream, AbstractDataOutput, etc.) to serialize
primitive types - integers of various lengths, strings, etc, as part of
various inter-node messages, and so on.

This patch implements similar primitive type serialization/deserialization
in C++. The interface is quite different, but the functionality is the same
and so is the serialized format. The fact that the format is identical
(I verified this) is important, because we want a C++ node to be able to
communicate with a Java node.

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
2015-01-05 11:52:58 +02:00
Avi Kivity
64000fc74d Merge branch 'asias/db' of github.com:cloudius-systems/seastar-dev into db
Convert db/composites/{CType.java, CellNameType.java}, from Asias.
2015-01-05 11:50:57 +02:00
Avi Kivity
b1f67fa2af Merge branch 'master' of github.com:cloudius-systems/seastar into db 2015-01-05 11:43:56 +02:00
Avi Kivity
f2e25b8442 Merge branch 'shared_ptr'
Split shared_ptr into a traditional polymorphic shared_ptr implementation,
and a lighter-weight, non polymorphic lw_shared_ptr.
2015-01-05 11:29:35 +02:00
Avi Kivity
c7d7494a65 shared_ptr: add some documentation 2015-01-05 10:39:35 +02:00
Asias He
ec0a5670dd db: Convert db/composites/CellNameType.java to C++ 2015-01-05 14:28:26 +08:00
Asias He
ce9ef19f64 db: Convert db/composites/CType.java to C++ 2015-01-05 14:27:19 +08:00
Asias He
11f2f47ae7 cql3: Convert cql3/CQL3Row.java
Stub only.
2015-01-05 14:13:31 +08:00
Asias He
dd805f8add db: Convert db/DeletionInfo.java and db/RangeTombstone.java to C++
Stub only.
2015-01-05 14:13:31 +08:00
Asias He
c9882d7d96 db: Import db/RangeTombstone.java 2015-01-05 14:13:31 +08:00
Asias He
9769752779 db: Import db/DeletionInfo.java 2015-01-05 14:13:31 +08:00
Asias He
7d0ef20a80 Add comparator 2015-01-05 14:13:31 +08:00
Asias He
888a2436cb db: Convert db/OnDiskAtom.java to C++
Stub only.
2015-01-05 14:13:31 +08:00
Asias He
c059c56790 db: Import db/OnDiskAtom.java 2015-01-05 14:13:31 +08:00
Asias He
00ec6857e4 io: Convert io/ISerializer.java 2015-01-05 14:13:31 +08:00
Asias He
fcfa1e1f58 io: Import io/ISerializer.java 2015-01-05 14:13:31 +08:00
Asias He
076be9c0d1 io: Convert io/IVersionedSerializer.java to C++ 2015-01-05 14:13:31 +08:00