Skip to content
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

feat(options): allow special handling and checking when creating options from superflag #1688

Merged
merged 2 commits into from
Apr 5, 2021

Conversation

NamanJain8
Copy link
Contributor

@NamanJain8 NamanJain8 commented Apr 5, 2021

We provide few special options along with badger options.

// Special Handling: compression, cache-mb, cache-percentage sub-flags.
// Valid values for special flags:
// compression: valid options are {none,snappy,zstd:<level>}
// cache-mb: uint
// cache-percentage: 2 comma-separated values summing upto 100. Format: blockCache,indexCache
// goroutines: alias for numgoroutines.
// Example: compression=zstd:3; cache-mb=2048; cache-percentage=70,30; goroutines=8;

This change is Reviewable

@NamanJain8 NamanJain8 merged commit 9b176f1 into master Apr 5, 2021
@NamanJain8 NamanJain8 deleted the naman/flags branch April 5, 2021 13:18
NamanJain8 added a commit to dgraph-io/dgraph that referenced this pull request Apr 6, 2021
)

Makes --badger flag to accept all the valid badger options (except Logger & EncryptionKey). Additionally. it accepts input for "compression" with following values [none, snappy, zstd:<level>].
Corresponding PRs in badger: dgraph-io/badger#1688, dgraph-io/badger#1689
It also renames "goroutines" subflag of --badger to "numgoroutines". Also, it removes "cache-size" and "cache-percentage" subflag from --badger in bulk command.

Additionally, this also moves the max-retries under --limit.
NamanJain8 added a commit to dgraph-io/dgraph that referenced this pull request Apr 9, 2021
)

Makes --badger flag to accept all the valid badger options (except Logger & EncryptionKey). Additionally. it accepts input for "compression" with following values [none, snappy, zstd:<level>].
Corresponding PRs in badger: dgraph-io/badger#1688, dgraph-io/badger#1689
It also renames "goroutines" subflag of --badger to "numgoroutines". Also, it removes "cache-size" and "cache-percentage" subflag from --badger in bulk command.

Additionally, this also moves the max-retries under --limit.

(cherry picked from commit 14c2b72)
NamanJain8 added a commit to dgraph-io/dgraph that referenced this pull request Apr 9, 2021
)

Makes --badger flag to accept all the valid badger options (except Logger & EncryptionKey). Additionally. it accepts input for "compression" with following values [none, snappy, zstd:<level>].
Corresponding PRs in badger: dgraph-io/badger#1688, dgraph-io/badger#1689
It also renames "goroutines" subflag of --badger to "numgoroutines". Also, it removes "cache-size" and "cache-percentage" subflag from --badger in bulk command.

Additionally, this also moves the max-retries under --limit.

(cherry picked from commit 14c2b72)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants