featurebase/dax
Travis Turner 468461fbcf
Add Drop Database and Drop Table support (#2208)
* Support Drop Table in serverless (include Snapshotter, Writelogger)

* Finish Database methods

Things like:
- `Databases`
- `DatabaseByID`
- `DatabaseByName`
- `DropDatabase`

* Change Poller to use NodeService instead of its own map

Instead of the Poller maintaining its own map of Addresses to poll, this
commit changes the Poller to use the NodeService interface to get all
known nodes from the Controller.

The next commit needs to:
Next, the logic in the boltdb NodeService implementation was moved to
the boltdb Balancer implementation. That way, the Balancer can be the
source of truth for all things nodes/workers/jobs.

* Move NodeService from Controller to Balancer

This commit moves the implementation of the NodeService into the
Balancer, and aligns `Balancer.AddWorker` with `NodeService.CreateNode`
so that they stay in sync. (Same for `Balancer.RemoveWorker` and
`NodeService.DeleteNode`).

* fix import of private repo

* Fix go vet issues

* Fix bug in DeregisterNode

We need to remove the node from the NodeService even if it's not
assigned to a database. The logic had a bug in it.

This also adds some no-op implementations for SnapshotService and
WriteloggerService. If a directory was not configured for that, then the
computer node would panic on trying to read from the Snapshotter upon
receiving a Directive.

* queryer response content-type: json

* Add support for NULL to WriteloggerDir and SnapshotterDir configs

This commit changes the way WriteLoggerDir and SnapshotterDir are
handled.
If value is empty `""`, an error will be returned on computer startup.
If value is `"NULL"`, a no-op implementation of the service will be
used. This would be for a case that wanted to run serverless on-prem
with no durable storage.
Finally, any other value will be used as the directory to use.

Some things which aren't considered here and may result in unexpected
behavior:
- a value with spaces `" "`
- any "null" which is not "NULL"... like lowercase.

* Finish the DropTable test

* Change "disable service" value to case-insensitive "off"

This commit also removes an unnecessary sleep in the tests.

* Fix docker-compose variables for IDK test

Co-authored-by: Matthew Jaffee <jaffee@pilosa.com>
2023-01-23 19:59:47 -06:00
..
boltdb Add Drop Database and Drop Table support (#2208) 2023-01-23 19:59:47 -06:00
computer Add Drop Database and Drop Table support (#2208) 2023-01-23 19:59:47 -06:00
http Add Drop Database and Drop Table support (#2208) 2023-01-23 19:59:47 -06:00
mds Add Drop Database and Drop Table support (#2208) 2023-01-23 19:59:47 -06:00
queryer Add Drop Database and Drop Table support (#2208) 2023-01-23 19:59:47 -06:00
server Add Drop Database and Drop Table support (#2208) 2023-01-23 19:59:47 -06:00
snapshotter Add Drop Database and Drop Table support (#2208) 2023-01-23 19:59:47 -06:00
storage Add Drop Database and Drop Table support (#2208) 2023-01-23 19:59:47 -06:00
test Add Drop Database and Drop Table support (#2208) 2023-01-23 19:59:47 -06:00
writelogger Add Drop Database and Drop Table support (#2208) 2023-01-23 19:59:47 -06:00
address.go Database isolation: Balancer (#2407) 2023-01-19 22:10:08 +00:00
address_test.go Sync from private repo to commit 12d608c80d 2022-12-12 09:01:20 -08:00
controller.go Add Drop Database and Drop Table support (#2208) 2023-01-23 19:59:47 -06:00
dax.go Add Drop Database and Drop Table support (#2208) 2023-01-23 19:59:47 -06:00
directive.go Database isolation: Balancer (#2407) 2023-01-19 22:10:08 +00:00
docker-compose.yml Add Drop Database and Drop Table support (#2208) 2023-01-23 19:59:47 -06:00
errors.go Add Drop Database and Drop Table support (#2208) 2023-01-23 19:59:47 -06:00
Makefile first cut at automatic snapshotting 2023-01-10 23:26:29 +00:00
node.go Add Drop Database and Drop Table support (#2208) 2023-01-23 19:59:47 -06:00
README.md introduce performance counters and system table fanout, plus refactor metrics (#2363) 2023-01-19 21:35:02 +00:00
role.go Database isolation: Balancer (#2407) 2023-01-19 22:10:08 +00:00
schema.go Add Drop Database and Drop Table support (#2208) 2023-01-23 19:59:47 -06:00
service_manager.go Sup 294 pre sort command (#2209) 2023-01-23 12:26:38 -06:00
snapshot.go remove version/directive stuff from other snapshot endpoints 2023-01-10 23:22:58 +00:00
table.go Add Drop Database and Drop Table support (#2208) 2023-01-23 19:59:47 -06:00
table_test.go Database isolation: Balancer (#2407) 2023-01-19 22:10:08 +00:00
time.go Add DAX - full list of squashed commits below 2022-12-12 09:01:20 -08:00
transaction.go Database isolation: Balancer (#2407) 2023-01-19 22:10:08 +00:00
versioned_partition.go first cut at removing all the shard/field/partition versioning 2023-01-10 23:27:40 +00:00
versioned_shard.go first cut at removing all the shard/field/partition versioning 2023-01-10 23:27:40 +00:00
workerjob.go Database isolation: Balancer (#2407) 2023-01-19 22:10:08 +00:00
workerjob_test.go Add DAX - full list of squashed commits below 2022-12-12 09:01:20 -08:00

DAX

DAX encapsulates anything which covers all of the services which make up the "disaggregation of storage and compute" project. Initially, this will include integration tests which pull in things like Metadata Services (MDS), including the Controller, as well as FeatureBase and IDK-based ingesters.

Setting up the tests

The DAX test currently requires docker images for: featurebase and datagen.

If at any point you run into problems with go mod failing to reference a private repo, make sure that you have gitlab.com/featurebasedb in your GOPRIVATE environment variable.

Note that during the docker image build step, go mod vendor is run, which creates a vendor directory in the root directory, and copies that to docker during the build stage. Just be aware of this; you may want to remove that vendor directory after you're done building docker images.

Possible Configuruation

The following were relevent when the dax code was in a separate repository. These may no longer be relevant.

I needed to but this in my ~/.profile file:

export GOPRIVATE=github.com/featurebasedb,gitlab.com/featurebasedb

And this in my ~/.gitconfig

[url "ssh://git@github.com/"]
	insteadOf = https://github.com/
[url "ssh://git@gitlab.com/"]
	insteadOf = https://gitlab.com/

Then make docker ran successfully.

Build the FeatureBase docker image

  • Check out the dax branch of the featurebase repository.
  • Run make docker-image-featurebase to build the docker image
  • You should now have an image in docker named dax/featurebase with the tag latest.

Build the Datagen docker image

  • cd <featurebase_repo_root>/idk
  • Run make docker-image-datagen to build the docker image
  • You should now have an image in docker named dax/datagen with the tag latest.

Running the tests

  • Check out the dax branch of the featurebase repository.
  • Change into the dax directory: cd dax
  • Run make test-integration.