Commit Graph

27 Commits (8ed55e72b85b0807c97d3d1d7d12e9f07c9737e9)

Author SHA1 Message Date
Jeffrey Smith II f026d7bdaf
fix: Fixes migrating when a remote already exists (#23912)
* fix: handle migrating with already defined remotes

* test: add test to verify migrating already defined remotes

* fix: properly handle Up
2022-11-17 14:23:10 -05:00
Dane Strandboge 6fc66acb0a
fix: do not require remoteOrgID in remote config/creation request (#23838) 2022-11-01 09:47:45 -05:00
Renato Costa ee8ca451c4
fix: use copy of loop variable in parallel test (#23669)
This fixes an occurrence of a loop variable being captured in a
parallel test. With the previous code, only the last test case is
actually exercised. To work around this problem, we create a local
copy of the range variable before the parallel test, as suggested in
the Go documentation for the `testing` package:

https://pkg.go.dev/testing#hdr-Subtests_and_Sub_benchmarks

Issue was found automatically using the `loopvarcapture` linter.
2022-08-24 13:22:09 -04:00
Jeffrey Smith II daaf8665bb
fix: several minor quality issues (#23667)
* fix: invalid assign to nil pointer

* fix: close some files that were being left open

* fix: lint
2022-08-23 15:54:46 -04:00
Jeffrey Smith II 6f50e70960
feat: replicate based on bucket name rather than id (#23638)
* feat: add the ability to replicate based on bucket name rather than bucket id.

- This adds compatibility with 1.x replication targets

* fix: improve error checking and add tests

* fix: add additional constraint to replications table

* fix: use OR not AND for constraint

* feat: delete invalid replications on downgrade

* fix: should be less than 2.4

* test: add test around down migration and cleanup migration code

* fix: use nil instead of platform.ID(1) for better consistency

* fix: fix tests

* fix: fix tests
2022-08-18 14:21:59 -04:00
Dane Strandboge f7b1905ed7
fix: do not delete replication on remote config delete (#23493) 2022-08-02 11:03:23 -05:00
Dane Strandboge 82d1123e78
build: upgrade to Go 1.18.1 (#23252) 2022-04-13 15:24:27 -05:00
Dane Strandboge 359fcc46b5
feat: add maximum age to replication queues (#23206)
Co-authored-by: Sam Arnold <sarnold@influxdata.com>
2022-03-25 13:06:05 -05:00
William Baker ad52815e19
feat: add field for dropping data resulting in non-retryable errors to individual replications (#22885)
* feat: add field for dropping data resulting in non-retryable errors to individual replications
2021-11-16 13:41:54 -07:00
Daniel Moran 1aac92c5ee
refactor: remove replications.current_queue_size_bytes from sqlite (#22832)
Maintaining the current queue size in a SQL column would require
updating the DB on every queue operation. Avoid that contention by
instead looking up the current size on the in-memory durable queue
struct, which is already tracked & updated as data enters & leaves
the queue.
2021-11-05 14:35:12 -04:00
William Baker f7573f43a7
feat: sql migrator can do down migrations (#22806)
* feat: sql down migrations

* refactor: different name for up migrations

* chore: update migrations ref in svc tests

* build: add lint step to verify sql migration names match
2021-11-01 14:30:18 -06:00
Daniel Moran 0fbda8397d
feat: recommend `influxd downgrade` after encountering unknown KV migration (#22805) 2021-11-01 11:07:54 -04:00
William Baker b3b4dd6503
feat: sql migrator uses records of completed migrations (#22797)
* feat: sql migrator uses records of completed migrations
2021-10-29 09:29:10 -06:00
Daniel Moran 335b74b25f
feat: take a backup of KV/SQL metadata stores before applying migrations (#22765) 2021-10-28 16:02:15 -04:00
Sam Arnold 5015297d40
fix: more expressive errors (#22448)
* fix: more expressive errors

Closes #22446

* fix: server only logging for untyped errors

* chore: fix formatting
2021-09-13 15:12:35 -04:00
Daniel Moran eb5f5c3c5b
test: close test SQL store before deleting its tmp dir in tests (#22421) 2021-09-08 11:12:21 -04:00
Daniel Moran dc3b501298
refactor: rename Lock/Unlock on KV stores to RLock/RUnlock (#22357) 2021-08-31 17:03:54 -04:00
Daniel Moran 11c97470a5
fix: add created_at and updated_at columns to replications table (#22293) 2021-08-24 14:56:47 -04:00
Daniel Moran 409256c748
feat: add SQL migration for replication metadata (#22288) 2021-08-24 13:19:27 -04:00
Daniel Moran 2237d02828
feat: add SQL migration for remote connection metadata (#22237) 2021-08-17 15:21:16 -04:00
William Baker b5b36b2804
feat: migrations for annotations & notebooks resource types on operator token (#21840)
* feat: migration for operator token to include permissions for annotations and notebooks

* feat: run migrations for restored dbs

* chore: cleanup go.mod

* chore: better description comment for migration

* fix: fixed cursor return condition

* fix: hard code the list of old operator permissions

* feat: run migrations prior to swapping restored dbs

* fix: fix the sqlite migrator

* chore: update CHANGELOG
2021-07-14 09:23:25 -05:00
William Baker ff31c9b8fa
docs: README for annotations, notebooks, and sqlite (#21832)
* docs: sqlite package docs

* docs: annotations and notebooks README

* chore: fix typos & corrections
2021-07-12 12:18:12 -05:00
William Baker 1935c13c16
feat(annotations): storage service (#21690)
* feat(annotations): storage service

* feat: stickers are in db as array

* chore: fix some unintended diffs

* fix: fixes from review

* fix: specific table name for json_each

* fix: update primary keys and constraints

* fix: fix schema

* feat: stream name updates are reflected in annotations via FK
2021-06-15 18:36:11 -04:00
William Baker 40c7d69415
feat: use go embed for sqlite migrations (#21653) 2021-06-10 18:40:57 -04:00
William Baker b0ea3b6675
feat: backup and restore sqlite database (#21584)
* feat: new metadata backup endpoint

* feat: added restore/sql API endpoint

* fix: content-type is multipart/mixed, part names are kv and sql

* fix: changed multipart manifest to buckets and made it .json

* feat: added lock for backing up sqlite and bolt dbs

* fix: use read lock instead of write lock on kv during backup

* fix: use filepath.Join for temp dirs
2021-06-02 19:07:53 -04:00
William Baker ed629bfebe
feat(notebooks): notebooks database implementation (#21573) 2021-05-28 09:29:00 -04:00
William Baker 19b0470ed7
feat: integrated sqlite db for metadata (#21543) 2021-05-25 12:12:07 -04:00