Skip to content

Rename env var GITBASE_UNSTABLE_SQUASH_ENABLE #250

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ SELECT hash, author_email, author_name FROM commits LIMIT 2;

### Environment variables

| Name | Description |
|:-----------------------------|:----------------------------------------------------|
| `BBLFSH_ENDPOINT` | bblfshd endpoint, default "127.0.0.1:9432" |
| `GITBASE_BLOBS_MAX_SIZE` | maximum blob size to return in MiB, default 5 MiB |
| `GITBASE_BLOBS_ALLOW_BINARY` | enable retrieval of binary blobs, default `false` |
| `UNSTABLE_SQUASH_ENABLE` | **UNSTABLE** check *Unstable features* |
| `GITBASE_SKIP_GIT_ERRORS` | do not stop queries on git errors, default disabled |
| Name | Description |
|:---------------------------------|:----------------------------------------------------|
| `BBLFSH_ENDPOINT` | bblfshd endpoint, default "127.0.0.1:9432" |
| `GITBASE_BLOBS_MAX_SIZE` | maximum blob size to return in MiB, default 5 MiB |
| `GITBASE_BLOBS_ALLOW_BINARY` | enable retrieval of binary blobs, default `false` |
| `GITBASE_UNSTABLE_SQUASH_ENABLE` | **UNSTABLE** check *Unstable features* |
| `GITBASE_SKIP_GIT_ERRORS` | do not stop queries on git errors, default disabled |

## Tables

Expand Down Expand Up @@ -95,7 +95,7 @@ To make some common tasks easier for the user, there are some functions to inter

## Unstable features

- **Table squashing:** there is an optimization that collects inner joins between tables with a set of supported conditions and converts them into a single node that retrieves the data in chained steps (getting first the commits and then the blobs of every commit instead of joinin all commits and all blobs, for example). It can be enabled with the environment variable `UNSTABLE_SQUASH_ENABLE`.
- **Table squashing:** there is an optimization that collects inner joins between tables with a set of supported conditions and converts them into a single node that retrieves the data in chained steps (getting first the commits and then the blobs of every commit instead of joinin all commits and all blobs, for example). It can be enabled with the environment variable `GITBASE_UNSTABLE_SQUASH_ENABLE`.

## Examples

Expand Down
4 changes: 2 additions & 2 deletions cli/gitbase/cmd/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const (
ServerHelp = ServerDescription + "\n\n" +
"The squashing tables and pushing down join conditions is still a\n" +
"work in progress and unstable,disable by default can be enabled\n" +
"using a not empty value at UNSTABLE_SQUASH_ENABLE env variable.\n\n" +
"using a not empty value at GITBASE_UNSTABLE_SQUASH_ENABLE env variable.\n\n" +
"By default when gitbase encounters and error in a repository it\n" +
"stops the query. With GITBASE_SKIP_GIT_ERRORS variable it won't\n" +
"complain and just skip those rows or repositories."
Expand All @@ -36,7 +36,7 @@ type Server struct {
Password string `short:"P" long:"password" default:"" description:"Password used for connection"`

// UnstableSquash quashing tables and pushing down join conditions is still
// a work in progress and unstable. To enable it, the UNSTABLE_SQUASH_ENABLE
// a work in progress and unstable. To enable it, the GITBASE_UNSTABLE_SQUASH_ENABLE
// must not be empty.
UnstableSquash bool
// IgnoreGitErrors by default when gitbase encounters and error in a
Expand Down
2 changes: 1 addition & 1 deletion cli/gitbase/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func main() {
parser := flags.NewNamedParser(name, flags.Default)

parser.AddCommand("server", cmd.ServerDescription, cmd.ServerHelp, &cmd.Server{
UnstableSquash: os.Getenv("UNSTABLE_SQUASH_ENABLE") != "",
UnstableSquash: os.Getenv("GITBASE_UNSTABLE_SQUASH_ENABLE") != "",
SkipGitErrors: os.Getenv("GITBASE_SKIP_GIT_ERRORS") != "",
})

Expand Down