Commit Graph

1319 Commits (73b3a2a0565dbf8b2caa4225ba10ae5777e8ca44)

Author SHA1 Message Date
Jason Wilder 2212c32108 Merge pull request #5604 from jonseymour/typo
typo: databse -> database
2016-02-10 11:04:39 -07:00
Ben Johnson 5a0d1ab7c1 rename influxdb/influxdb to influxdata/influxdb
This commit changes all the import and URL references from:

    github.com/influxdb/influxdb

to:

    github.com/influxdata/influxdb
2016-02-10 10:26:18 -07:00
Jonathan A. Sternberg dd3c75ef1c Remove a bad query test from the integration tests
We no longer throw this error and an empty result is appropriate since
there are no values in that interval.
2016-02-10 09:40:30 -07:00
Jonathan A. Sternberg 5c9cdd05c2 Modify the fill iterator to not produce empty name/tags for a time range
If a name/tag combination does not have any points in the time range at
all, fill will not generate points for it.
2016-02-10 09:40:30 -07:00
Ben Johnson 08f823546d fix rebase issue 2016-02-10 09:40:29 -07:00
Ben Johnson 627cd9d486 add dedupe iterator 2016-02-10 09:40:29 -07:00
Jonathan A. Sternberg dbb9b36d84 Support integers with top() and bottom() and fix point ordering
top() and bottom() point ordering was incorrect and using an inefficient
method of sorting. It has now been updated to use a heap and ordering is
being done by value first and time second (with earlier times always
taking priority).

Removed unit tests that test using `time` inside of the query to get the
real time instead of the interval time and only allowing the default
behavior. We will have another mechanism to get the real time during an
interval, but the current method is deprecated.

The top() and bottom() methods now have integer support.
2016-02-10 09:40:27 -07:00
Ben Johnson a0fe0ca437 fix new query engine test regressions 2016-02-10 09:40:27 -07:00
Ben Johnson b8918a780c integer support 2016-02-10 09:40:25 -07:00
Jonathan A. Sternberg e7d39092d2 Updating the unit tests for TestServer_Query_Aggregates_IntMany_GroupBy
It had the time values for the selectors being returned equal the actual
points time. We have decided to have the time always be the interval
time and adding another feature later that can return the selected
point's time in the future.
2016-02-10 09:40:25 -07:00
Ben Johnson 57336bd6ee fix conditionals 2016-02-10 09:40:24 -07:00
Ben Johnson 60b051ee88 LIMIT/OFFSET 2016-02-10 09:40:24 -07:00
Ben Johnson cde973f409 refactor query engine 2016-02-10 09:40:24 -07:00
Jon Seymour 375f56333e typo: databse -> database
Signed-off-by: Jon Seymour <jon@wildducktheories.com>
2016-02-10 11:34:34 +11:00
Philip O'Toole 3c1cbe0ea7 Don't dump blank entry for backup dir if not set 2016-02-09 08:13:40 -08:00
Philip O'Toole d2908def07 Make it clear what the trailing parallel factor is 2016-02-09 08:13:37 -08:00
Jason Wilder d4ee1cb2b1 Merge pull request #5284 from mglazer/secure-cli
CLI Option to Connect without HTTPS Verifica…
2016-02-08 11:45:32 -07:00
Jason Wilder c2fb3f8590 Merge pull request #5570 from jonseymour/typo
typo: remove trailing i.
2016-02-08 08:31:40 -07:00
Jon Seymour 0f674e5c59 typo: remove trailing i.
Signed-off-by: Jon Seymour <jon@wildducktheories.com>
2016-02-08 16:44:42 +11:00
runner.mei 978305a6dd fix unit test of influxd in the windows
fix unit test of influxd in the windows
2016-02-05 11:44:14 +08:00
Jason Wilder 1c19320e79 Merge pull request #5515 from influxdata/jw-config
Remove top-level dir config option
2016-02-02 13:26:11 -07:00
Jason Wilder 51da6e3d56 Remove top-level dir config option
This breaks backup/restore if it's not "meta" as well as breaks
upgrades from prior releases for some users.
2016-02-02 13:03:44 -07:00
Seif Lotfy 0864816c8b Add unit tests to ensure retention policy for non existing db is not created 2016-02-02 21:03:16 +01:00
Seif Lotfy c3fb710871 Initialize MetaClient before setting it up as a data and/or meta node
Take out MetaClient initialization from initializeDataNode and invoke it
in (server.)Open after MetaService is opened.
Fixes #5479
2016-02-02 17:39:29 +01:00
Edward Robinson b8e42cdd3a Ensure non-interactive mode returns appropriate exit code
Fixes #5475.
2016-02-02 15:23:16 +00:00
Cory LaNou f8b1aa69a1 ignore join arguments on restart 2016-02-01 12:47:15 -05:00
joelegasse 834744a4c3 Merge pull request #5472 from influxdata/jl-backup-dir
Update influx_tsm to use a backup directory
2016-01-28 13:35:57 -05:00
Joe LeGasse 8f3131b97d Update influx_tsm to use a backup directory 2016-01-28 12:36:34 -05:00
Cory LaNou 0f6c75ab7d make tests pass 2016-01-28 11:03:44 -06:00
Cory LaNou 53323737b2 no longer need nil check 2016-01-28 10:05:54 -06:00
Cory LaNou d70b694d7d fix misc meta statup bugs 2016-01-28 10:05:53 -06:00
Cory LaNou 31c2e7012a allow for node upgrade 2016-01-28 10:05:53 -06:00
joelegasse 9ab5de0a34 Merge pull request #5454 from joelegasse/influx_tsm
TSM conversion tool improvements
2016-01-28 10:38:47 -05:00
Joe LeGasse 482772997e Updated tests for 'influx_tsm'
Also changed some things to fix failing tests on circleCI, and
removed old TODO item
2016-01-28 09:34:00 -05:00
Jason Wilder 716714364a Backup node.json with metastore backup 2016-01-27 17:39:54 -07:00
Joe LeGasse 908259340b Improvements to influx_tsm
- Improve logging and status updates
- Added debug http endpoint
- Properly resume/skip backed up files
2016-01-27 16:13:23 -08:00
Todd Persen 3723680747 Merge pull request #5460 from sczk/issue-5436
Prevent exponential growth in ~/.influx_history
2016-01-27 15:12:31 -08:00
Joe LeGasse 4f89c15bd3 Replaced more log.Print();os.Exit(1) with log.Fatal() 2016-01-27 07:25:46 -08:00
Adam Svoboda 40e04d89fc Prevent exponential growth in ~/.influx_history
The history file is cleared before WriteHistory is called after each
command/exit() to prevent exponential file growth.

This commit addresses issue #5436, please see PR for full explanation.
2016-01-26 20:53:41 -06: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
Joe LeGasse cdde2959af Limit parallelism for 'influx_tsm -parallel' 2016-01-26 09:11:09 -08:00
Jason Wilder 1696db1c40 Fixup default hostname and config 2016-01-22 17:05:25 -07:00
David Norton 914a9a1de6 fix build after rebase 2016-01-21 15:38:13 -05:00
Jason Wilder 8456169855 Update backup/restore to use MetaClient 2016-01-21 15:32:35 -05:00
Cory LaNou ef596c6b6b skip backup/restore test until we update the code 2016-01-21 15:32:03 -05:00
Cory LaNou 15314111cb buildable test suite 2016-01-21 15:31:27 -05:00
David Norton 19c79af840 fix build break 2016-01-21 15:31:27 -05:00
David Norton 177ce33b02 fix build break 2016-01-21 15:31:27 -05:00
Jason Wilder b7e1ecf471 Close idle MetaClient http connections
Prevents too many open files when running tests
2016-01-21 15:30:09 -05:00
Jason Wilder ad52d0fbd9 Fix tests 2016-01-21 15:30:09 -05:00
Jason Wilder bbe13c2818 Ensure HTTP and TCP bind addresses have hostnames
If a bind-address of :8088 is used, cluster nodes cannot
connect to those nodes because there is no hostname portion
of the address.  When we see a bind-address without a hostname,
use the os hostname or localhost if that fails if it is not specified
in the config already.
2016-01-21 15:28:34 -05:00
Ross McDonald 83cca53e9e Removed references to restore from influxd's main.go, which was causing compile issues. 2016-01-21 15:28:34 -05:00
Paul Dix 7b71b66e31 Update meta service, meta client, and httpd handler
* Improve the ping endpoint so that it can optionally check for leader agreement across all meta servers
* Add Ping method to the meta client
* Fix ClusterID tests
* Remove WaitForLeader from meta client and remove unnecessary references to it
2016-01-21 15:28:33 -05:00
Paul Dix 101ab32571 Fix meta-service for server integration tests
* Updated CreateShardGroup to not return an error if it already exists so it's idempotent
* Removed old test making sure you can't delete the default RP. You can delete it now, there was no reason to disallow it.
* Wired up the UpdateRetentionPolicy functionality
2016-01-21 15:28:33 -05:00
Paul Dix 68f33c93ce Finish wiring up meta service to server 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
Paul Dix c9d82ad0ad Wire up meta service functionality
* Add dir, hostname, and bind address to top level config since it applies to services other than meta
* Add enabled flags to example toml for data and meta services
* Wire up add/remove raft peers and meta servers to meta service
* Update DROP SERVER to be either DROP META SERVER or DROP DATA SERVER
* Bring over statement executor from old meta package
* Start meta service client implementation
* Update meta service test to use the client
* Wire up node ID/meta server storage information
2016-01-21 15:28:32 -05:00
Cory LaNou 9ec7a710c9 some misc refactoring on influxd startup 2016-01-21 15:28:32 -05:00
Cory LaNou 8d878fff91 buildable meta -> services/meta 2016-01-21 15:28:32 -05:00
Jason Wilder b51c6a935f Improve backup/restore logging and help commands 2016-01-20 13:46:14 -07:00
Joe LeGasse 8791011b10 Validate metadata backup blob
Fixes #5349
2016-01-19 10:30:08 -08:00
Joe LeGasse dfc59e8a13 Ensure the backup directory exists.
Fixes #5350
2016-01-15 14:38:33 -08:00
Philip O'Toole 82e16a1899 Merge pull request #5309 from influxdata/c_usage
Unit test scrubbing values during conversion
2016-01-07 14:59:39 -08:00
Philip O'Toole 653dba3759 Merge pull request #5129 from e-dard/fix-precision-flag
Ensure precision flag is respected in CLI
2016-01-07 14:48:57 -08:00
Jason Wilder 16829dedc8 Merge pull request #5308 from influxdata/jw-compact-large
Use block size and file size before skipping a file during compactions
2016-01-07 15:48:03 -07:00
Philip O'Toole cd2de5f25d Unit test scrubbing values during conversion 2016-01-07 14:33:42 -08:00
Edd Robinson c6d32bd1bb Fix #5127 2016-01-07 22:30:46 +00:00
Philip O'Toole 2d2c315356 Dump points per TSM point written 2016-01-07 13:58:23 -08:00
Jason Wilder 0264d77545 Fix block sizes reported by influx_inspect 2016-01-07 14:51:59 -07:00
Philip O'Toole 13d2b69c29 Dump conversion factor on completion 2016-01-07 13:50:56 -08:00
Philip O'Toole bab2a00e5d Track bytes written by conversion tool 2016-01-07 13:50:45 -08:00
Philip O'Toole 9b02808e6c ShardInfos now returns size 2016-01-07 13:36:25 -08:00
Philip O'Toole 067cc71923 Count number of fieldless points filtered 2016-01-06 11:52:42 -08:00
Philip O'Toole ff96e17ddb Skip points without fields 2016-01-06 11:45:20 -08:00
Philip O'Toole 9c916b0b76 Best-effort cleanup of converter. 2016-01-05 19:27:27 -08:00
Philip O'Toole 2a547b0db3 Increment sequence, not generation
Avoid having all the new files getting picked up by the compaction
planner on startup.
2016-01-05 19:27:22 -08:00
Philip O'Toole fbb3e861ca Clearer database backup message 2016-01-05 17:51:52 -08:00
Philip O'Toole 075ef45ae1 Gather conversion stats 2016-01-05 16:55:22 -08:00
Philip O'Toole cac96113c0 Merge pull request #5278 from influxdata/c_fixes
Skip bz1 bolt files without any points
2016-01-05 19:09:49 -05:00
Jason Wilder 90292dd429 Merge pull request #5279 from influxdata/jw-compaction-memory
Reduce allocations during TSM compactions
2016-01-05 16:50:18 -07:00
Philip O'Toole 140f54a01d Skip bolt files without any points 2016-01-05 15:19:56 -08:00
Jason Wilder dd90824eb5 Fix go vet in restore.go 2016-01-05 09:37:44 -07:00
Philip O'Toole d53674e2cc Add note about new tsm1 directory permissions
[ci skip]
2016-01-04 15:23:05 -08:00
Philip O'Toole ed10978b71 Increase default max TSM file size 2016-01-04 13:58:43 -08:00
Philip O'Toole 250c10f126 Tweak influx_tsm help output 2016-01-04 13:58:12 -08:00
Philip O'Toole 8212bc82b9 Correct typo in influx_tsm help 2016-01-04 13:55:36 -08:00
Jonathan A. Sternberg c825ff7bae Merge pull request #5203 from influxdb/js-fix-use-test-panic
Add a mock client to the cli test for Use
2016-01-04 13:54:03 -05:00
Paul Dix ee233c849a Merge pull request #5224 from influxdb/pd-backup-restore
Implement backup/restore for TSM.
2015-12-31 08:56:12 -05:00
Paul Dix 49d480cb0c Fix races in backup/restore 2015-12-31 08:42:01 -05:00
Paul Dix 9cede5fb71 Address PR comments 2015-12-30 18:06:51 -05:00
Paul Dix 26e1c6464a Update backup to address PR comments 2015-12-30 18:06:51 -05:00
Paul Dix 59fbd371fc Implement backup/restore for TSM.
This changes backup and restore to work for TSM. It breaks it for b1 and bz1, but since those are getting removed it's ok.

The backup runs against any host that is specified and can backup either the metasstore, a database, specific retention policy, or a specific shard. It can also take incremental backups with the `since` flag, which will only backup TSM files that have been created since that timestamp.

The backup is safe to run online. However, for shards that are still hot for writes, they won't be able to create new TSM files while the backup for that single shard runs. If the backup isn't too large and the write throughput isn't too high this shouldn't be a problem since the writes will just go into the WAL cache.
2015-12-30 18:06:50 -05:00
Michael Desa bf1673f466 Merge pull request #5239 from influxdb/md-add-db
Add flag to specify db and clarify flag descriptions
2015-12-30 10:59:31 -08:00
Michael Desa 7c025d8497 Change db flag message 2015-12-29 13:12:05 -08:00
Philip O'Toole eaec514ca0 b*1 to tsm1 shard converter 2015-12-29 15:31:07 -05:00
Jonathan A. Sternberg 6b546cb766 Remove calls of os.Exit from influx cli Run method and fix influx tests
One of the first unit tests in the cli tests called the Run method.
Since the Run method called os.Exit, it reported the unit tests as
succeeded. When parallel is set to 1, this skips _all_ unit tests after
the first one. When parallel is set to a higher value, unit tests run by
other processes still get run.

This changes the Run method to return an error (if one occurred). This
error can then be printed out and a bad exit status can be used to exit
the program from the main program instead.  That causes the unit tests
to run correctly regardless of how many parallel processes are running.

Also added an additional option to the CLI called `IgnoreSignals`. If
this is set to true, then signals are not registered with the process.
Setting signals doesn't really work in unit tests so it's good to ensure
they don't get set in the first place.

In addition to fixing the influx cli tests, this adds a mock client to
the cli test for Use. PR #5183 added a validation for `use` to only be
able to select public databases so `_internal` couldn't be chosen. To
implement this, the `SHOW DATABASES` command was used by the internal
client.

Some of the unit tests in `cli_test.go` don't set the client to
anything. `TestParseCommand_Use` previously didn't, but now it needs to
have a client in the unit test with an empty test server.
2015-12-29 14:58:54 -05:00
Michael Desa ebd9b9978e Add flag to specify db and clarify flag descriptions 2015-12-29 11:31:28 -08:00
Mike Glazer c049ebfa43 Support connecting to InfluxDB with the client without HTTPS Verification
The V2 client code supports this, however, the V1 client code didn't,
and the argument to support this just had to be added to the CLI
2015-12-29 09:03:16 -08:00
Jason Wilder a38c95ec85 Update compactions to run concurrently
This has a few changes in it (unfortuantely).  The main change is to run compactions
concurrently.  While implementing this, a few query and performance bugs showed up that
are also fixed by this commit.
2015-12-23 18:01:11 -07:00
Philip O'Toole 767a7f5131 'broker' and 'data' are obsolete 2015-12-23 15:27:47 -05:00