Commit Graph

215 Commits (8d9e3550bded01bf29892b4ac2cc75f0c92a178d)

Author SHA1 Message Date
Lorenzo Affetti 9defb8a77f
feat(http): add document service 2020-02-21 15:58:40 +01:00
George f239a2ed9c
fix(kv): remove URM and Authorizations by UserID Index (#16852)
* Revert "fix(kv): Don't stop when key not found from index."

This reverts commit bd9167d383.

* Revert "fix(kv): push down org ID to skip in delete URM (#16841)"

This reverts commit a5f508de77.

* Revert "fix(kv): delete authorization from correct index bucket (#16835)"

This reverts commit 7349216e94.

* Revert "feat(kv): Index Authorizations by User ID (#16818)"

This reverts commit df36fe957b.

* Revert "feat: add indexes to urm for user lookups (#16789)"

This reverts commit 9561d0a4f4.
2020-02-13 15:27:57 +00:00
Brett Buddin bd9167d383
fix(kv): Don't stop when key not found from index. 2020-02-12 21:38:17 -05:00
Chris Goller a5f508de77
fix(kv): push down org ID to skip in delete URM (#16841)
* fix(kv): push down org ID to skip in delete URM

* fix(kv): use database key rather than resource id

We are trying to skip deletes that would remove keys
that have already been deleted.  This is a rather
extreme approach and I believe we should think about how
to fix user-resource-mappings.

Co-authored-by:  Lyon Hill <lyondhill@gmail.com>
Signed-off-by: Chris Goller <goller@gmail.com>

Co-authored-by: George <me@georgemac.com>
Co-authored-by: Lyon Hill <lyondhill@gmail.com>
2020-02-12 14:33:57 -06:00
George 7349216e94
fix(kv): delete authorization from correct index bucket (#16835)
* fix(kv): delete authorization from correct index bucket

* fix(kv): return not found code when user resource mapping indexed by not in source

* chore(kv): define failing test for URM on delete
2020-02-12 18:36:45 +00:00
George df36fe957b
feat(kv): Index Authorizations by User ID (#16818)
* feat(kv): add user id index on authorizations

* chore(auths): test FindAuthorizations both with and without a populated index

* chore(kv): cleanup index skipping flag in auths service

* fix(kv): bad flag around auth by user index population

* fix(kv): auth by user index lookup use correct buckets

* chore(kv): ensure indexer is called as expected when auth user index missing

* chore(kv): add benchmarks around authorization lookup
2020-02-11 17:34:20 +00:00
Lyon Hill 9561d0a4f4
feat: add indexes to urm for user lookups (#16789) 2020-02-11 09:17:37 -07:00
Lyon Hill ec13042c57
feat(kv): Create a indexer to allow the addition of indexes (#16745)
* feat(kv): Create a indexer to allow the addition of indexes

This will allow the population of indexes to be incremental and allow
for a rolling update to the index's to be handled cleanly.
2020-02-07 09:01:37 -07:00
George bc64968b0b
chore(task): add test around paging using after (#16774)
* chore(task): add test around paging using after

* fix(kv): support filter.After in FindTasksByUser
2020-02-07 15:48:55 +00:00
George fe990aa4db
feat(kv): add cursor option skip first item (#16758) 2020-02-06 12:18:47 -07:00
Lyon Hill ef848d0aa4
fix(kv): task lookup for all tasks will now skip the after key (#16757) 2020-02-06 10:44:36 -07:00
Kelvin Wang 53d9caf1c6 fix(kv): fix patching panics 2020-02-05 11:12:03 -05:00
Greg e593119c3d
feat: report telegraf plugin usage metrics (#16378)
* Begin implementing retreival of telegraf plugin stats

* Implement storing/deletion of telegraf plugin stats

* Test plugin stats

* Initialize plugins bucket for tests

* Add comment

* Shorten time and frequency in bolt when providing telegraf plugins metrics

* Simplify ticker loop

* Leak underlying ticker while still satisfying linter
2020-02-04 08:24:58 -07:00
Lyon Hill 8bd6044398
fix(kv): update user and variables to use forward cursor (#16671) 2020-02-03 08:50:06 -07:00
Lyon Hill f385d19713
fix(kv): update tasks kv to use forward cursor (#16670) 2020-02-03 08:49:51 -07:00
Lyon Hill cb7f053d45
fix(kv): Update scrapers to use new forward cursor (#16647)
* fix(kv): Update scrapers to use new forward cursor

I also made a minor update to move a db lookup outside of a for loop to save
time and optimize

* fix(inmem): fix a potential race condition
2020-01-24 13:35:47 -07:00
Lyon Hill d1c0ddc362
fix(kv): update kv source to use the new forward cursor (#16659) 2020-01-24 09:46:01 -07:00
Lyon Hill 0fa52eec9d
fix(kv): update kv secrets to use new forward cursor (#16648) 2020-01-24 09:24:20 -07:00
Gavin Cabbage b91d778579 feat: resource log 2020-01-23 13:04:06 -05:00
Lyon Hill 379fd085fc
fix(kv): update org collection to use forward cursor (#16639) 2020-01-23 08:47:02 -07:00
Lyon Hill d509946bef
fix(kv): update notification rules to use the new forward cursor (#16637) 2020-01-23 08:46:53 -07:00
Lyon Hill 25cc4ea83d
fix(kv): update label collection to use new forward cursor (#16636) 2020-01-23 08:46:40 -07:00
Lyon Hill a7dddba728
fix(kv): Update documents in kv to use new forward cursor (#16635) 2020-01-23 08:46:23 -07:00
Lyon Hill 8894b65d2d
fix(kv): update kvlog to use the new forward cursor (#16634) 2020-01-23 08:46:09 -07:00
Lyon Hill 635be50323
fix(kv): Update dashboard collection to use new forward cursor (#16626)
By updating to the new forward pointer the query should be more efficient.
2020-01-22 11:01:09 -07:00
George 8b2109362d fix(kv): use forward cursor in find all buckets (#16605)
* fix(kv): use forward cursor in find all buckets

Co-authored-by: Lyon Hill <lyondhill@gmail.com>
2020-01-21 15:27:47 -07:00
Jacob Marble b836ab9c17
feat(storage): implement backup and restore (#16504)
* feat(backup): `influx backup` creates data backup

* feat(backup): initial restore work

* feat(restore): initial restore impl

Adds a restore tool which does offline restore of data and metadata.

* fix(restore): pr cleanup

* fix(restore): fix data dir creation

* fix(restore): pr cleanup

* chore: amend CHANGELOG

* fix: restore to empty dir fails differently

* feat(backup): backup and restore credentials

Saves the credentials file to backups and restores it from backups.

Additionally adds some logging for errors when fetching backup files.

* fix(restore): add missed commit

* fix(restore): pr cleanup

* fix(restore): fix default credentials restore path

* fix(backup): actually copy the credentials file for the backup

* fix: dirs get 0777, files get 0666

* fix: small review feedback

Co-authored-by: tmgordeeva <tanya@influxdata.com>
2020-01-21 14:22:45 -08:00
George 4f14ceabab
feat(kv): add support for prefixed cursor search (#16545)
* feat(kv): add support for prefixed cursor search

* chore(kv): ensure kv store implementation return seek missing prefix error in tests

* chore(kv): update changelog
2020-01-21 12:52:30 +00:00
Zoe Steinkamp 9d1dd1c14f
Merge pull request #16457 from influxdata/zs-improveErrorMessage16447
fix(ui): improve error message for create check (#16447)
2020-01-10 08:17:00 -07:00
Johnny Steenbergen 825b4f8da7 fix(kv): fix issue with cursor not closing inside TX
also drops the prefix search optimizations from index store as well.
2020-01-09 11:31:43 -08:00
Zoe Steinkamp 50a30f6589 fix(ui): improve error message for create check (#16447) 2020-01-08 15:54:07 -07:00
Johnny Steenbergen 56754f92f2 fix(kv): remove normalizing of variables names to downcase
note: this will remain unique by name case insensitive

closes #16429
2020-01-07 09:36:40 -08:00
Johnny Steenbergen ec35815553 chore(kv): add new/update checks to kv store base and index store 2020-01-06 16:18:01 -08:00
Alirie Gray 6c6bd39ffc
refactor(tasks): remove dead scheduler code (#16252) 2020-01-02 11:41:21 -08:00
Johnny Steenbergen b6308ba07c chore(kv): refactor kv.Entity to provide interface for PK and unique keys 2020-01-02 08:05:45 -08:00
Johnny Steenbergen 77dd06bc5e fix: enable skipped tests for notification rules and fixup issue in tag matcher 2020-01-02 07:16:03 -08:00
Deniz Kusefoglu 219d73bf60
fix(notificationrules): Correct logic on matching notification rules (#16328)
* fix(notificationrules): Correct logic on matching notification rules

* feat(nrs): Add more tests
2019-12-31 23:44:27 +00:00
Johnny Steenbergen 0dfc163dae chore(kv): refactor kv checks service to take advantage of new index store 2019-12-31 13:13:38 -08:00
Johnny Steenbergen 370e533901 fix(kv): fixup the filtering for index store
was not correctly using the filterFn
2019-12-31 13:13:38 -08:00
Deniz Kusefoglu fcc39e371f
feat(checks): Add custom check type (#16350)
* feat(checks): Add custom check type

* feat(checks): Remove alert builder from custom check

* feat(checks): Add AlertBuilderAction to list of possible actions

* feat(checks): Query visualization does not make sense for custom check

* feat(check): check editor should only reexecute queries if view query changes

* Update ui/src/timeMachine/components/TimeMachineFluxEditor.tsx

Co-Authored-By: Bucky Schwarz <hoorayimhelping@users.noreply.github.com>

* Address PR review

Co-authored-by: Bucky Schwarz <hoorayimhelping@users.noreply.github.com>
2019-12-31 20:21:48 +00:00
Johnny Steenbergen 4fb855feff fix(kv): add legacy variable orgs index back
issue here is that the unique by name index for variables was implemented
and has the same functionality about it that this orgs index has. The duplicative
orgs index was nuked. The migration to hydrate the org/name index never
happened. This is a stop gap until that migration is in place.
2019-12-31 10:58:15 -08:00
Johnny Steenbergen e79771fdcc chore(kv): refactor new unique by store up into reusable store that composes into uniq by store 2019-12-30 16:44:57 -08:00
Johnny Steenbergen 5a6bda238c chore(kv): refactor variable service to use the new uniqByNameStore type 2019-12-30 16:44:57 -08:00
Johnny Steenbergen 300d89887d chore(kv): refactor notification endpoint to use reusable uniqByNameStore
this is work moving us towards more reusable components that add some
rigidity around handling indexes and the entity bucket. The behavior
is very common across much of the kv pkg. This can be reused throughout.
adding some easy wins for tracing(eventually metrics) that enable more
insight that what is currently possible. It normalizes these concerns
across the kv store.
2019-12-30 16:44:57 -08:00
Johnny Steenbergen fb325fbc10 chore(kv): drop duplicative tests 2019-12-30 16:27:36 -08:00
Johnny Steenbergen e6f1805e5e chore(inmem): nuke the duplicative inmem store
use kv store... its a thing
2019-12-30 11:04:45 -08:00
Greg abd8ce0089
feat(http): add functionality to retrieve/store telegraf config as toml (#16132) 2019-12-20 14:20:13 -07:00
George 48b8cb84f7
feat(kv): define forward cursor interface (#16212)
* feat(kv): define forward cursor interface

* feat(kv): implement ForwardCursor on bolt and inmem buckets

* feat(kv): update tests to capture forward cursor

* fix(kv): typo in docs

* feat(kv): add Err method to ForwardCursor interface

* feat(inmem): batch pair channel sends in forward cursor

* fix(kv): remove Err field from kv.Pair

* feat(kv): add Close to kv.ForwardCursor interface
2019-12-19 17:30:05 +01:00
Johnny Steenbergen 677e836bf4 feat(pkger): add apply functionality for checks
this work is to support pkger, but was able to add back in the
skipped tests. seeing failures upstream, and didn't catch it in
influxdb b/c the tests were being skipped.

closes: #14799
2019-12-18 15:02:03 -08:00
Brett Buddin 6b544919a3
fix(kv): Prevent infinite loop condition when listing tasks by org.
In the event that findTaskByIDWithAuth cannot find the task ID contained
in the bucket, the outer loop will never terminate.

This ensures that we are calling Next() along-side any calls to continue
while using a Cursor.
2019-12-18 09:23:54 -05:00