Commit Graph

416 Commits (659706e8749cfc6848b46071cdc1075125c7710c)

Author SHA1 Message Date
Philip O'Toole d627634991 Ensure internal retention policy exists 2015-03-15 14:32:46 -07:00
Philip O'Toole ae3b3d5252 Rename "metrics" to "stats" 2015-03-15 14:32:46 -07:00
Philip O'Toole 5240151517 Actually start self-monitoring if requested 2015-03-15 14:32:11 -07:00
Philip O'Toole bf28720c6e Add "name" to stats object
This "name" becomes the Measurement name. In addition the implementation
for "SHOW STATS" has been re-instated.
2015-03-15 14:32:11 -07:00
Philip O'Toole 6867d806de Use Inc() shorthand for Stats 2015-03-15 14:32:11 -07:00
Philip O'Toole f730257ee4 Implement self-monitoring 2015-03-15 14:31:16 -07:00
Philip O'Toole 228e238436 Remove unnecessary err variable 2015-03-15 14:31:16 -07:00
Philip O'Toole 8825580500 Track server stats 2015-03-15 14:31:16 -07:00
Todd Persen b842bf2446 Merge pull request #1952 from dullgiulio/delete-no-panic
return error on delete statement, closes #1933
2015-03-15 10:16:42 -07:00
Ben Johnson 06d839223e Integration test delay. 2015-03-14 14:31:25 -06:00
Ben Johnson 41d357ac04 Fixes based on code review comments. 2015-03-14 14:07:09 -06:00
Ben Johnson 53dbec8232 Add config notifications and increased test coverage. 2015-03-14 13:36:06 -06:00
Giulio Iotti 2cc2077c3d do not accept empty database name in drop 2015-03-14 21:31:44 +02:00
Giulio Iotti 38bb2cf62e do not allow empty database name, closes #1950 2015-03-14 15:39:22 +02:00
Giulio Iotti a4f96a3b9f return error on delete statement, closes #1933 2015-03-14 11:14:32 +02:00
Ben Johnson 4b9a93d924 Merge branch 'master' of https://github.com/influxdb/influxdb into stateless-broker 2015-03-12 15:46:04 -06:00
Philip O'Toole d82d040e59 Create databases for Graphite at higher level
By doing this the SeriesWriter interface stays focused and just has
methods for writing data. Its name then remains coherent.
2015-03-12 13:33:25 -07:00
Ben Johnson 7880bc2452 Add zero length data checks. 2015-03-12 12:12:26 -06:00
Ben Johnson 7ab19b9f91 Merge branch 'master' of https://github.com/influxdb/influxdb into stateless-broker 2015-03-12 11:59:55 -06:00
Cory LaNou ddc6e119ab Add default column to SHOW RETENTION POLICIES 2015-03-12 11:07:51 -06:00
Cory LaNou 8655ed3d91 fixing default retention policy creation 2015-03-12 10:01:26 -06:00
Ben Johnson 5f6bcf523f Fix broker integration bugs. 2015-03-11 12:00:45 -06:00
Cory LaNou 982e59a416 Merge pull request #1906 from influxdb/show-servers
Add show servers to query language
2015-03-11 10:38:11 -06:00
Cory LaNou f6121a9b63 fixing edge case for infinite retention policy 2015-03-11 10:14:53 -06:00
Ben Johnson 66115f95ca Merge branch 'master' of https://github.com/influxdb/influxdb into stateless-broker
Conflicts:
	cmd/influxd/run.go
	messaging/broker.go
	messaging/client.go
	messaging/client_test.go
	messaging/intg_test.go
	server.go
	tx_test.go
2015-03-10 16:27:37 -06:00
Cory LaNou 5e65a07b31 retrieve list of data nodes 2015-03-10 15:47:34 -06:00
Ben Johnson 27e9132796 Integrate stateless broker into remaining packages. 2015-03-10 14:53:45 -06:00
Cory LaNou db067b6a2d move constant 2015-03-10 12:24:26 -06:00
Cory LaNou 91487cc8dd update comment 2015-03-10 10:52:23 -06:00
Cory LaNou b8fb723967 Enforce retention policy minimum (currently 1 hour) 2015-03-10 10:49:54 -06:00
Cory LaNou c150a8c8bc run all create shards groups through same methods 2015-03-09 18:54:37 -06:00
Cory LaNou 7495e6eb1c fix comments, some renaming, adding rlock 2015-03-09 18:05:39 -06:00
Cory LaNou b6e7210f47 close channel 2015-03-09 17:36:50 -06:00
Cory LaNou 67f03ef26b Pre-create shard groups
1) Pre create shard groups

2) Calculate and save the ShardGroupDuration for Retention Policies. This should never change even if they alter a retention policy in the future
2015-03-09 17:30:17 -06:00
Philip O'Toole abf664c18d Merge pull request #1895 from influxdb/create_default_rp
Create retention policy by default
2015-03-09 16:26:41 -07:00
Philip O'Toole f72313edd9 Support retention policy auto-creation 2015-03-09 16:24:03 -07:00
Ben Johnson 5f5c6ca297 Integrate stateless messaging into influxdb package. 2015-03-09 15:47:41 -06:00
Ben Johnson 713ca4b831 Merge branch 'master' into stateless-broker
Conflicts:
	messaging/broker.go
2015-03-09 12:27:14 -06:00
Philip O'Toole 1db4851e49 RLock Server when checking retention policies 2015-03-09 10:56:59 -07:00
Joseph Rothrock 9b63eed767 Merge branch 'master' of github.com:influxdb/influxdb into 1753
Conflicts:
	CHANGELOG.md
2015-03-06 12:37:15 -08:00
Joseph Rothrock 771ef1cec3 Don't Panic on Missing Dirs
Issue: 1753
Figure out what's missing, create it, and keep going.
2015-03-06 12:11:02 -08:00
Philip O'Toole 76c255a3c8 Add trace-level logging to server write path 2015-03-05 17:35:57 -08:00
Todd Persen 93b56ca058 Make sure queries for missing measurements return a `200 OK` even when using a `GROUP BY *`. 2015-03-05 17:27:46 -08:00
Philip O'Toole 77d8986626 Don't delete data with infinite retention 2015-03-05 15:22:36 -08:00
Ben Johnson 1bbf154f2a Removing replicas and subscriptions from broker. 2015-03-01 22:32:20 -07:00
Kai Zhang ef262171d6 trim command line before parse it
This can avoid some errors caused by an additional space at the end of
the command line.

For example: 'use db ' will be trimed to 'use db' and parsed correctly.

Signed-off-by: Kai Zhang <zhangk1985@gmail.com>
2015-03-01 10:44:20 +08:00
Philip O'Toole a7c0d71d9c Merge pull request #1770 from kylezh/dev
Fix error when alter retention policy
2015-02-27 20:55:14 -08:00
Paul Dix a26f11f489 fixes based on @dgnorton's feedback 2015-02-27 01:09:38 -05:00
Paul Dix 52f257e349 Make show series return IDs and work with limit and offset.
Fixes #1765
2015-02-27 01:09:38 -05:00
Kai Zhang 9f8639ded8 Fix error when alter retention policy
+ fix error when execute ALTER RETENTION POLICY bar ON foo DURATION 1h
+ add test to verify the fix

Signed-off-by: Kai Zhang <zhangk1985@gmail.com>
2015-02-27 09:54:39 +08:00
Cory LaNou 0ab43cc8a5 adding better error message to return 2015-02-26 17:10:09 -07:00
Cory LaNou 499a5dcb33 show series should only return for measurements with series data 2015-02-26 17:10:09 -07:00
Cory LaNou 66c5750726 return early if no measurement. clarify comments 2015-02-25 12:56:23 -07:00
Cory LaNou fb2f7416ed drop shard data 2015-02-25 12:42:23 -07:00
Cory LaNou a151fe64d4 deleting data from metastore. wip 2015-02-25 12:42:23 -07:00
Cory LaNou 0ad76c637d broadcastig drop measurement 2015-02-25 12:42:23 -07:00
Cory LaNou 079f64338b wiring up droping series, wip 2015-02-25 12:42:23 -07:00
Philip O'Toole eb0480ebdf Perform retention checks again UTC time 2015-02-25 10:55:48 -08:00
David Norton e7e04cdeb0 fix #1717: code review chng & update CHANGELOG.md 2015-02-24 14:35:22 -05:00
David Norton 95a5f2588e fix #1717: all points must have at least one field 2015-02-24 14:09:10 -05:00
Paul Dix 86972788d3 Merge pull request #1632 from influxdb/wildcard_group_by
Implement comprehensive query wildcard re-write
2015-02-24 00:13:37 -05:00
Philip O'Toole 41ad49f1c1 Add wildcard detection method to SelectStatement 2015-02-23 19:09:55 -08:00
Philip O'Toole 84de4ad56c Add wildcard rewrite functionality for SELECT
This code, when given a SELECT statement, returns another SELECT
statement such that all "query" and GROUP BY wildcards have been
replaced with all Measurement fields and tag keys respectively.
2015-02-23 19:09:55 -08:00
Philip O'Toole 86b91ead94 "SHOW TAG VALUES" now outputs series per tag key
This change tightens up the type used for "Series" so the pre-existing
sort method can be used.
2015-02-23 17:15:55 -08:00
Philip O'Toole 2f0fe901e3 Rename "Values" to "Fields" for writes 2015-02-23 15:06:56 -08:00
Todd Persen 2cc23d3c66 Merge pull request #1529 from influxdb/stats-reporting
Bring back stats reporting.
2015-02-23 12:57:49 -08:00
Todd Persen f647cdc031 Add read locking and inline data collection. 2015-02-23 12:37:17 -08:00
Cory LaNou 8e086a447b Change delete to drop for [dD]ropDatabase 2015-02-23 13:14:18 -07:00
Todd Persen 20a5d0b932 Rename ids for clarity. 2015-02-23 10:42:39 -08:00
Todd Persen c059e21974 Also track number of databases. 2015-02-23 10:42:39 -08:00
Todd Persen 20e7f2a750 Some small cleanups. 2015-02-23 10:42:39 -08:00
Todd Persen e45611cde3 Pull in cluster ID for reporting. 2015-02-23 10:42:39 -08:00
Todd Persen ddf1332ff8 Add reporting of series and measurement counts 2015-02-23 10:42:39 -08:00
Todd Persen ff1c61c5c1 Only report if ReportingDisabled is set to false. 2015-02-23 10:42:39 -08:00
Todd Persen 2ac2538ed3 Don't block for stats reporting. 2015-02-23 10:42:39 -08:00
Todd Persen c366fcbbf6 Update stats reporting to just POST for now. 2015-02-23 10:42:38 -08:00
Philip O'Toole 3e727ac01e Change "Rows" to "Series" in API output 2015-02-22 21:21:49 -08:00
Philip O'Toole 9ab1221a35 Move Raft command types to own file
server.go is getting long, so start breaking it up a little.
2015-02-22 11:50:43 -08:00
Cory LaNou 8637a10b6a start with seriesByMeasurement 2015-02-21 22:18:25 -07:00
Cory LaNou 29910c3c99 better transaction batching for drop series 2015-02-21 21:48:18 -07:00
Cory LaNou d5ac049812 remove bogus method 2015-02-21 20:20:36 -07:00
Cory LaNou d35e2a92b1 locking is now done in process messages 2015-02-21 19:14:00 -07:00
Cory LaNou c575ee9a04 fixing a fat fingering rebase 2015-02-21 19:13:01 -07:00
Cory LaNou 2752ada587 moving more responsibility to database.dropSeries 2015-02-21 17:21:27 -07:00
Cory LaNou 6114c8138e refactoring drop series 2015-02-21 17:21:27 -07:00
David Norton 61352f78b6 pass all series IDs to Server.DropSeries at once 2015-02-21 17:18:50 -07:00
David Norton 9a6e29ece8 collect all series IDs then unlock 2015-02-21 17:18:50 -07:00
Cory LaNou 5ab3731159 delete -> drop for series naming 2015-02-21 17:18:50 -07:00
Cory LaNou 697e9721dd fixing rebase conflicts 2015-02-21 17:10:12 -07:00
Cory LaNou 0d6b7616de accidentally lost this in my rebase 2015-02-21 17:10:11 -07:00
Cory LaNou 495cedb53b move where we unlock 2015-02-21 17:10:11 -07:00
Cory LaNou 4948b62784 first working version of drop series. more testing to come 2015-02-21 17:10:11 -07:00
Cory LaNou 8306057179 actually drop shard data 2015-02-21 17:10:11 -07:00
Cory LaNou 6d5be3da25 wip. compiles now. tests next 2015-02-21 17:10:11 -07:00
Cory LaNou 7cfc2a5601 wip 2015-02-21 17:10:11 -07:00
Cory LaNou 6370a4ef2b wip in progress for actually dropping the series data 2015-02-21 17:05:08 -07:00
Ben Johnson 4e5b6e93ff Merge pull request #1672 from influxdb/data-node-recovery
Add index tracking to metastore.
2015-02-21 15:34:54 -07:00
Ben Johnson 4dbd1541f7 Add index tracking to metastore.
This commit adds tracking of the index to the metastore so that data
nodes will ignore replayed indexes when they are restarted. This
does not include index persistence for the shards.
2015-02-21 13:46:16 -07:00
David Norton 9bff9cdeee issue #1431: wire up regex queries 2015-02-21 15:38:35 -05:00
Philip O'Toole 9c4174a006 Simplify locking in WriteSeries()
In addition, memomize the Field codecs.
2015-02-20 14:26:12 -08:00
Philip O'Toole 612ef1fa08 Write batch in a single BoltDB transaction 2015-02-20 11:28:07 -08:00
Philip O'Toole bd4352c77d Remove unused shardsBySeriesID
Its presence is making Bolt-level batching quite awkward, and since it's
not used, just remove it.
2015-02-20 11:28:07 -08:00
Philip O'Toole 169409ac03 Move to slices for creating measurements
Using maps was resulting in unpredicatable ordering of columns and tags.
2015-02-20 11:28:07 -08:00
Philip O'Toole f5b2962d42 Incorporate inital code review feedback 2015-02-20 11:28:07 -08:00
Philip O'Toole 5c61b7d8b8 Add new fields even when Measurement exists 2015-02-20 11:28:07 -08:00
Philip O'Toole 0e3e223e84 Always ensure measurement exists in command
Unit tests need updating since some tests are no longer valid.
2015-02-20 11:28:07 -08:00
Philip O'Toole 2585a9ea4f Encode real batches for shards 2015-02-20 11:28:07 -08:00
Philip O'Toole ff765793e6 Implement applyCreateMeasurementsIfNotExists 2015-02-20 11:28:07 -08:00
Philip O'Toole 25c3b104b7 WriteSeries now uses batching 2015-02-20 11:28:06 -08:00
Philip O'Toole 0d3ab9fa1d Create-measurement command in local function 2015-02-20 11:28:06 -08:00
Philip O'Toole 3435da9626 Correctly initialize createMeasurement maps
Full unit tests added for happy paths.
2015-02-20 11:28:06 -08:00
Philip O'Toole 55fbd7e42c Batch Measurement creation 2015-02-20 11:28:06 -08:00
Paul Dix 6fd7dd028a Fix conflict with createFields and createContinuousQuery message types 2015-02-17 21:06:48 -05:00
Paul Dix 36d16a3172 Update broker to have URLs for replicas
* Update the infludb broker to not need a server so that it'll work on non-data node servers
* Update messaging broker to keep track of connect urls for replicas
2015-02-17 21:02:53 -05:00
Paul Dix 8fee14fbf8 Fixes based on PR feedback.
* Pull out magic numbers for running CQs in the broker
* Typo fixes in comments
* Update the process_continuous_queries endpoint to not have gzip
* Remove previous implementation of MeasurementNames in favor of new simpler one
2015-02-17 21:02:53 -05:00
Paul Dix edcc20bcab Wire up show continuous queries 2015-02-17 21:02:52 -05:00
Paul Dix 8d9bcdbc97 Finish wiring up basic version of CQs 2015-02-17 21:02:52 -05:00
Paul Dix fec6764b09 WIP: wire up continuous queries
* Fix run to work with CQ broker
* Fix CQ handler
* Fix SetTimeRange to use RFC3339Nano
* Fix the time range tests
* Fix the parser to parse for RFC3339Nano literals in addition to the other format
* Add logic for running CQs
* Remove duplicate WriteBufferSize default setting from config
2015-02-17 21:02:18 -05:00
Paul Dix b0d4b6da55 WIP: fix cq query times 2015-02-17 21:01:21 -05:00
Paul Dix f2d132b361 Implement continuous queries with group by intervals
* Update defaults on Broker for when to trigger CQ runs
* Add config settings for how often to calculate and recalculate CQ results
* Update Server to have CQ settings
* Update AST to fold removed time literals when setting time range
* Add periodic CQ running functionality to server
2015-02-17 21:00:24 -05:00
Paul Dix 4217778a08 Add periodic triggering of continuous queries to broker.
* Create influxdb specific broker that will periodically start continuous query calculation. Will send to the same data node as long as it's up and responding
* Add endpoint in handler to start processing of continuous queries on a data node
2015-02-17 21:00:24 -05:00
Paul Dix 5f14d5faf5 WIP: start implementation of continuous queries
* Update SelectStatement to have GroupByInterval
* Update parser to verify that CQs have GroupByInterval if Aggregated
* Implement CreateContinousQuery on Server
* Add ContinuousQueries to database
2015-02-17 21:00:24 -05:00
Frontend bacd500a7f fix typo stuct to struct 2015-02-17 16:53:31 -05:00
Philip O'Toole e74fadfd53 Merge branch 'master' of github.com:influxdb/influxdb into support_all_value_types 2015-02-17 12:55:12 -08:00
Philip O'Toole ae81dff9f6 Use Field codec in debug code 2015-02-16 16:43:35 -08:00
Philip O'Toole 6db74aa9bb Implement codec's encode 2015-02-16 16:01:52 -08:00
Philip O'Toole 8cdee6a997 Clarify use of ReadSeries() 2015-02-16 10:28:06 -08:00
Philip O'Toole dcdb4b77a1 Merge branch 'master' into support_all_value_types
Conflicts:
	database.go
	server.go
2015-02-16 09:21:10 -08:00
Philip O'Toole 9db17a7e09 Only update Metastore if new fields were created
It is quite possible that multiple applyCreateFieldsIfNotExist messages
will sit unapplied in the Raft commit log, each carrying exactly the same
information about new fields. So during application of this message only
change the Metastore if the fields actually changed.
2015-02-15 16:58:29 -08:00
Philip O'Toole 276c5ded5a int maps to influxql.Number 2015-02-13 16:28:12 -08:00
Philip O'Toole 9061a70953 Don't perform marshalling during field creation 2015-02-13 15:59:46 -08:00
Philip O'Toole 31f65361e4 Fix up locking 2015-02-13 15:41:27 -08:00
Philip O'Toole 75ebfaf3dd Use "create fields" broadcast message 2015-02-13 15:41:27 -08:00
Philip O'Toole 32faba7248 Add "create fields" broadcast message 2015-02-13 15:41:27 -08:00
Philip O'Toole c0655fb45d Release RLock if database does not exist 2015-02-13 15:19:17 -08:00
Philip O'Toole 0ca98ea6c2 Remove unmarshalValues 2015-02-12 16:07:25 -08:00
Philip O'Toole 5b8c0748af Remove marshalValues
Code now on Measurement type
2015-02-12 16:07:20 -08:00
Philip O'Toole bf9bfd6106 Error if field's type has changed 2015-02-12 16:06:37 -08:00
David Norton 8f9f8051a4 fix #1579: SHOW MEASUREMENTS format 2015-02-11 23:03:44 -05:00
Philip O'Toole 19cd5509c0 Retention policy and database were reversed in log 2015-02-11 10:11:09 -08:00
Philip O'Toole 8cb06c5b8e Refactor retention policy enforcement for testing 2015-02-11 09:54:07 -08:00
Philip O'Toole ddb57b4569 Explain why shard deletion may fail 2015-02-11 09:54:07 -08:00
Philip O'Toole 91f863258c Close shard before deletion 2015-02-11 09:54:07 -08:00
Philip O'Toole 65edd6b277 Detect shard groups due for deletion 2015-02-11 09:54:07 -08:00
Philip O'Toole 6a20100d2f Implement "delete shard group" command 2015-02-11 09:54:07 -08:00
Philip O'Toole 37647cc6a6 Add function to return shard group by ID
If shard groups were stored in a map by ID, this lookup could be sped
up.
2015-02-11 09:54:07 -08:00
Philip O'Toole 50ef1672cb Add stubbed enable of retention policy enforcement 2015-02-11 09:54:07 -08:00
Ben Johnson e4178520da Close shards on server close. 2015-02-10 22:18:36 -07:00
Philip O'Toole d00718c3a8 Update retention policy before saving database
Without this change, new shard group information is not persisted in the
metastore and only when the next database-save took place would this
update be persisted. If the server shutdown before the update, the new
shard group would be lost.
2015-02-10 19:21:02 -08:00
Philip O'Toole c003b39611 Only need read-lock for path 2015-02-10 16:53:43 -08:00