Commit Graph

156 Commits (119ba299b9c3b373d64dc21a1110b19ecce68e85)

Author SHA1 Message Date
Michael Mattioli 28f80a79e7 Removed unused code from balancer.go
Removed a block of code that was commented out
without explanation and provides no benefit
whatsoever
2016-02-03 21:33:28 -05:00
Jason Wilder d54f930c2d Don't parse points twice when receiving remote writes
The monitoring stats were causing points to be parsed twice create
more cpu time just parsing points.
2016-01-27 14:24:56 -07:00
Jason Wilder 47c5ade858 Use faster point parsing for remote writes
Parsing the line protocol again on the receiving side of the remote
write consumes a lot cpu.  This uses a different marshaling format
that is much faster to parse after we already parsed the point on
the write side.
2016-01-27 14:24:09 -07:00
Jason Wilder 5abdb42a7d Use a bounded pool for remote writes
Under highly conncurrent write load, the coordinating node would
create a connection to any other node that is part of the replica
group.  Since each connection can be expensive, OOM sitations could
occur because there was no bounds on the number of new connections
that would be created.  If writes on a remote node were slow, connections
could pile up an exacerbate the problem.

This switches the pool to be bounded and has a checkout that is blocking
with a timeout.  If a connection is available, it's returned immediately.
If the pool still has room for more connections, it will create one if needed.
Otherwise, the call will block until a connection becomes available or
the timeout expires.  In the case of a timeout, it is propogated back up
to the PointsWriter that determine what do return to the client.
2016-01-26 17:08:36 -07:00
Jason Wilder f58f0f5373 Fix cluster tests 2016-01-21 15:28:34 -05:00
Jason Wilder e901b648a6 Use TCPHost for writing and query to other nodes 2016-01-21 15:28:34 -05:00
Paul Dix fb9181d240 Fix meta-service build 2016-01-21 15:28:33 -05:00
Paul Dix f385945058 Update Server to work with new metaservice/client 2016-01-21 15:28:33 -05:00
Cory LaNou 8d878fff91 buildable meta -> services/meta 2016-01-21 15:28:32 -05:00
liang@qiniu.com c13f8e9128 Fix wrong results of distributed aggregative query 2015-12-08 07:08:46 +08:00
liang@qiniu.com 4026236659 fix issue 4801 2015-11-18 00:56:05 +08:00
Nathaniel Cook 1719a6107c PointsWriter will drop writes to subscriber service for any in-flight writes 2015-11-05 16:25:00 -07:00
Philip O'Toole de7919240f Migrate internal stats to consistent names
Go style -- and existing runtime stats -- do not use underscores, but
instead use camel case. This change makes the internal stats adhere to
that convention.
2015-10-28 21:07:45 -07:00
Philip O'Toole 2f80e68b2a Move node balancer into cluster package
Initial work for #3377.
2015-10-28 14:35:03 -07:00
Jason Wilder 0926b19e6b Prevent creating points with NaN float values
Float values are not supported in the existing engine and the tsm1
engines.  This changes NewPoint to return an error if a field value
contains a NaN field.  It also allows us to validate fields to prevent
other unsupported types from sneaking in through other input plugins.
2015-10-27 17:12:52 -06:00
MrLee.Kun 883640a288 change cluster logger tag 2015-10-27 15:32:51 +08:00
Charles Chan 9382d5b534 Fix typos.
* non-existant --> non-existent
* propogate --> propagate
2015-10-17 07:36:56 -07:00
Nathaniel Cook cb1aaa8e42 Merge pull request #4375 from influxdb/subscriptions
Feature add subscriber service for creating/dropping subscriptions
2015-10-15 09:17:26 -06:00
Sean Beckett 82f104a8b1 Merge pull request #4436 from influxdb/tag-names-to-keys
WIP tag name --> tag key, field name --> field key
2015-10-14 16:02:46 -07:00
Nathaniel Cook 8b31007aa7 Adds subscriber service for creating/dropping subscriptions to the
InfluxDB data stream.
2015-10-14 15:23:45 -06:00
Sean Beckett fd342ed411 Update rpc.go 2015-10-13 16:56:05 -07:00
Daniel Morsing 62dff895e2 wire up INTO queries.
Since INTO queries need to have absolute information about the database
to work, we need to create a loopback interface back to the cluster
in order to perform them.
2015-10-13 15:00:36 +00:00
Philip O'Toole faad42c1da Log a more accurate connection message
Not all connections are for writes, some are for mapping shards.
2015-10-06 13:39:51 -07:00
Philip O'Toole 2ac0357406 Support dropping non-Raft nodes 2015-10-04 00:19:52 -07:00
Philip O'Toole d74e0690c7 Revert "Merge pull request #4233 from influxdb/drop-server"
This reverts commit 0bdb36f6dc, reversing
changes made to 3085fbc138.
2015-10-02 08:39:57 -07:00
Cory LaNou f50813460e protobuf update.. :-( 2015-10-01 15:39:15 -05:00
Mint 9c6da2417e Fixed comments.
Issue: Enable golint on the code base #4098 (changes only for the cluster subpackage)

- [ ] CHANGELOG.md updated
- [X] Rebased/mergable
- [X] Tests pass
- [X] Sign [CLA](http://influxdb.com/community/cla.html) (if not already signed)
2015-09-28 23:38:21 -05:00
Mint 3cbc1936e5 Changes to make the cluster sub package golint-able
Issue: Enable golint on the code base #4098
2015-09-28 21:40:58 -05:00
Ben Johnson 1b8b625787 refactor SelectMapper 2015-09-22 13:09:26 -06:00
Philip O'Toole 1084d73092 Add cluster-service stats 2015-09-22 10:27:54 -07:00
Cory LaNou 72f6f7d268 Merge pull request #4134 from influxdb/issue-3447
Refactor Points and Rows to dedicated packages
2015-09-17 15:27:48 -05:00
Philip O'Toole 19384efde7 Return an error-on-write if RP does not exist 2015-09-16 18:40:29 -07:00
Cory LaNou d19a510ad2 refactor Points and Rows to dedicated packages 2015-09-16 15:33:08 -05:00
Jason Wilder ab164c20a2 Fix race in cluster RPC serialization
Point was accessed from multiple goroutines and there was a race on the the internal
cachedFields and cachedName fields.  Accessing these fields is unnecessary work as it
requires the point to be unmarshal into Go types and then remarshaled back into protbuf
types.  Instead, just send the line protocol version already available on the point via
the protobuf.  This avoid accesssing these cached fields and eliminates some extra work.

Possible fix for #4069
2015-09-15 16:21:39 -06:00
Philip O'Toole f0bbec6699 Add stats to PointsWriter 2015-09-08 19:30:07 -07:00
Jason Wilder ab0b2231a6 Wait for all the cluster connections to complete 2015-09-08 11:04:00 -06:00
Jason Wilder 99d02e3d62 Log the reason a remote write request might be dropped to the error message 2015-09-04 13:14:46 -06:00
Jason Wilder 1d4ee6c3fa Add tests for influx consistency level parsing 2015-09-02 09:22:15 -06:00
Takayuki Usui da8efa56e1 Fix writes possibly blocked with relaxed write consistency level
Immediately return once the required number of writes are completed,
otherwise requests running with relaxed consistency levels (e.g. any
or one) would be blocked unexpectedly, for instance, waiting for dead
nodes to respond.
2015-09-02 11:08:04 +09:00
Ben Johnson 767307eed6 convert meta shard owners to objects
This commit converts meta.ShardInfo.OwnerIDs from a slice of ids
to a slice of objects. This is to support adding statuses for a
shard for a given node. For example, a node may have a shard
assigned to it but it is currently copying the shard and is not
ready to serve data for it.

The old `OwnerIDs` is marked as deprecated, however, the code
still supports loading from older protobuf-encoded data.
2015-08-31 16:33:13 -06:00
Jason Wilder 027b6e36e7 Fix inconsistent results from show measurements
Running show measurements in a partially replicated cluster produces inconsistent
results due to the connection pooling.  When running remote meta-data queries,
the cluster service ends ups keeping map shard request open but still checks the connection
back into the pool. This causes inconsistent results because data from the last request
interferes with the new request.

This removes the connection pool which fixes the issue.  It also has the side effect of fixing
a nodes pool connections that have gone bad when a node restarts.  For example, in a 3 node cluster
that has been responding to queries correctly, restarting 1 node will cause all the other to fail
to query that node indefinitely.  This is now fixed as well.
2015-08-31 14:31:00 -06:00
David Norton 244948dc8d update shard mapper test 2015-08-25 10:20:58 -04:00
David Norton 88f556af72 convert SHOW MEASUREMENTS to a distributed query 2015-08-23 23:09:51 -04:00
David Norton 5d26cfa4d7 return interface{} from nextChunk* functions 2015-08-22 10:59:29 -04:00
David Norton c8f88f9a61 refactor remote mapping 2015-08-22 10:16:41 -04:00
Jason Wilder a7cb0df4af Fix typos/spacing 2015-08-13 10:02:05 -06:00
Jason Wilder 668181d275 Make log statements more consistent
* Capitalize first letter of message
* Log all services staring consistently
* Remove some extraneous log statements in meta.Store
* Log data dirs for meta, data and hinted handoff
2015-08-13 10:01:42 -06:00
David Norton d661bf1a06 fix #3414: shard mappers perform query re-writing 2015-08-04 09:49:50 -04:00
Philip O'Toole 10eecb441d Allow remote mapping to be forced
This is useful primarily for testing.
2015-07-20 10:44:45 -07:00
Philip O'Toole 425a65fca1 RemoteShard mapping now performed over TCP
With this change remote mapping no longer uses HTTP, as the HTTP ports
exposed by nodes on the cluster are not known cluster wide. The TCP
ports exposed by the cluster service are, so this change uses that
functionality. Each RemoteMapper has its own dedicated connection pool
for each node, and remote mapping TCP connections are in no way coupled
with query TCP connections.
2015-07-20 10:44:38 -07:00