Commit Graph

458 Commits (cfbff1df084bf5fd68222a190e50b2e9916b5e1e)

Author SHA1 Message Date
Jason Wilder e1322bb7d9 Add initial write_points http handler for text protocol 2015-05-29 11:18:40 -06:00
Jason Wilder 85f59d696b Create and open shards on-demand
Uses a structure like:

  /root/
      /db1/rp1/1
              /2
      /db2/rp2/3

If a write is assigned to a shard on the local node but the shard
has not been created, create it when the write returns an error
and retry the write.
2015-05-26 16:38:45 -06:00
Jason Wilder 7ace10f7e6 Load shards from filesystem when tsdb.Store is opened 2015-05-26 15:43:46 -06:00
Jason Wilder cb23a7a297 Fix breakage from rename of data to cluster package 2015-05-26 15:42:44 -06:00
Paul Dix 01618dc143 Move data.Node to tsdb.Store. Move data to cluster. 2015-05-26 15:56:54 -04:00
Jason Wilder 21bfb150a1 Wire up new write path
This allows the new write path to be hooked up if you start the
server with `INFLUXDB_ALPHA1=1`.  When set, writes will go though
the coordinator and be stubbed out to write to a single local data
node with one shards.  The write will be logged and written to
disk .

The env var is used so that the current write path is not completely
broken which would break many of the tests that depend on writes.

Note that queries are not currently working w/ the this change.
2015-05-26 12:07:56 -06:00
Jason Wilder 528f47e093 Convert Point.Fields to Point.Fields() 2015-05-22 15:22:03 -06:00
Jason Wilder f8d599cda9 Convert Point.Tags to Point.Tags() 2015-05-22 15:12:34 -06:00
Jason Wilder 5dcab443dc Move data.Point to tsdb.Point 2015-05-22 15:00:51 -06:00
Jason Wilder d633d7683f Convert Point.Name to Point.Name()
Hiding state behind interface.
2015-05-22 14:39:33 -06:00
Jason Wilder 997020963a Convert Point.Time to Point.Time()
Make public state private so that Point can be converted to an
interface.
2015-05-22 14:39:15 -06:00
Jason Wilder 01d7bfb398 Move coordinator to data package 2015-05-21 10:16:54 -06:00
Jason Wilder a8ce23ca26 Allow coordinator to write points to shards with a consistency
level.
2015-05-20 10:01:28 -06:00
Jason Wilder e513ab734e Allow coordinator to map points to multiple shards
Given a WritePointsRequest, MapShards will return a map
of shard ID to points.  This map can then be used to write
each point to the respective shard owners.
2015-05-20 10:01:28 -06:00
Jason Wilder f4af841cdf Merge branch 'master' into alpha1 2015-05-20 09:56:51 -06:00
Jason Wilder 050d97dd50 Don't create shard group for each point
Shard groups were being created for each point causing a a lot of
excessive broadcasts for large batches.
2015-05-19 09:31:02 -06:00
Cory LaNou 4e5c72ef69 refactor RewriteDistinct (thx @dgnorton) 2015-05-19 09:16:21 -06:00
Cory LaNou b9de38e7d4 support SELECT DISTINCT foo and SELECT distinct(foo) 2015-05-19 09:16:20 -06:00
Cory LaNou 06d40a2582 SELECT DISTINCT field -> SELECT distinct(field) 2015-05-19 09:16:20 -06:00
Cory LaNou 3d30720ec4 wip 2015-05-19 09:16:19 -06:00
Philip O'Toole 4da39a3a6f RLock shards during diagnostics 2015-05-18 11:39:37 -07:00
Jason Wilder 2b0cc493e5 Write path interfaces
This adds some placeholder interfaces for the new write path.
2015-05-18 12:35:34 -06:00
Philip O'Toole beb58eeb18 Refactor CQ code to avoid race conditions.
Fixes race detected by CircleCI:

https://circle-artifacts.com/gh/influxdb/influxdb/2332/artifacts/1/tmp/circle-artifacts.8UTeJCy/test_logs_race.txt
2015-05-12 15:50:46 -07:00
Philip O'Toole 4446274577 Run CQ passed into goroutine, not from outer loop 2015-05-12 15:00:37 -07:00
Philip O'Toole 2d1af26d1a Update messaging client connection index
With this change heartbeating to the brokers will always communicate the
index of the most recently replicated message. This will allow broker
truncation and broker diagnostics to operate correctly.
2015-05-11 15:29:12 -07:00
Todd Persen 730e8cdfd4 Merge pull request #2405 from neonstalwart/time
change timestamp to time
2015-05-11 12:38:00 -07:00
ben hockey 9a3c28748c change timestamp to time 2015-05-11 12:28:47 -05:00
Gabriel Taylor-Russ 44c0017fd8 Remove unused variable
Correct typo
2015-05-08 12:04:13 -07:00
Philip O'Toole b93554e39b RLock server when checking shard groups
This fixes a race detected by the race detector. "Create shard groups"
commands must be broadcast across the cluster without holding the server
lock so the commands are created under lock, and then processed after
releasing the lock.
2015-05-01 12:03:58 -07:00
Philip O'Toole 6cbc80fa50 Only access shard stats if shard is local
Fixes issue #2452
2015-04-29 15:05:45 -07:00
ben hockey cb2fe96ba0 count each executed query in queriesExecuted stat 2015-04-28 15:03:56 -05:00
Jason Wilder 6e2a0f8310 Use a read lock for reading data node URL 2015-04-27 19:11:22 -06:00
Jason Wilder 75e638f95b Use a read lock for running continuous queries 2015-04-27 19:10:22 -06:00
Jason Wilder 1efbdd1631 Use a read lock to look up a retention policy 2015-04-27 19:04:00 -06:00
Jason Wilder f624537cf8 Use a read lock to authenticate users 2015-04-27 19:02:01 -06:00
Jason Wilder 105637fc88 Use a read lock for admin user lookup 2015-04-27 18:59:28 -06:00
Jason Wilder 03ed70e6a3 Use read lock for user lookup 2015-04-27 18:48:20 -06:00
Philip O'Toole 76c29053cf Move drop series lock control into local function
This change means that lock control can use the defer call, which means
there is no chance the RLock will be left locked at function exit
Previously this code was more complex as it managed locks manually,
since the RLock must be released to allow the "drop series" broadcast
message go through.
2015-04-27 14:19:24 -07:00
Philip O'Toole 257aa4d6bd Always append shard path in diags
This code is clearer -- simply append an empty path if the shard is not
local.

Fixes issue #2430
2015-04-26 11:01:12 -07:00
Philip O'Toole 0994c8d9d5 Ensure no field value is null
Fix issue #2420.
2015-04-26 10:59:18 -07:00
Cory LaNou 022cb62fdb remove shards from server memory 2015-04-23 16:33:18 -06:00
Cory LaNou c27953a764 put shard responsibilities in shard.go 2015-04-23 16:33:18 -06:00
Cory LaNou b922cdcb76 shard stat created vs opened 2015-04-22 17:20:16 -06:00
Cory LaNou 9fee13ce41 format show stats properly and add more shard stats 2015-04-22 17:14:37 -06:00
Philip O'Toole b2b60532f1 Merge pull request #2383 from influxdb/serve_shard
Add HTTP endpoint that serves a requested shard
2015-04-22 09:33:35 -07:00
Philip O'Toole 68ba7ba005 Merge pull request #2387 from influxdb/no_local_shard_stats
There are no stats for non-local shards
2015-04-22 09:30:49 -07:00
Philip O'Toole e75e6a9526 Add HTTP endpoint that serves a requested shard
With this change a datanode can stream the requested shard to the
client. An error is returned if the shard does not exist or the the
shard is not local to that node.

1 data node can hit this endpoint to request data for a given shard if
the data no longer resides on the broker.
2015-04-22 09:29:19 -07:00
Philip O'Toole 52f968fbc4 There are no stats for non-local shards 2015-04-22 08:47:08 -07:00
Jason Wilder efa87633fa Fix shard datanodes stats getting appended too many times 2015-04-21 23:48:12 -06:00
Philip O'Toole c855549973 Add shard path to first diag value
Fix issue #2369
2015-04-21 19:19:08 -07:00