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

Parameterize Dynamodb config #615

Merged
merged 8 commits into from
Aug 14, 2020
Merged

Conversation

joowon-byun
Copy link
Contributor

Proposed changes

Able to set parameter for dynamo DB.

  • --db.dynamo.tablename
  • --db.dynamo.region
  • --db.dynamo.is-provisioned
  • --db.dynamo.read-capacity
  • --db.dynamo.write-capacity

Types of changes

Please put an x in the boxes related to your change.

  • Bugfix
  • New feature or enhancement
  • Others

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have read the CONTRIBUTING GUIDELINES doc
  • I have signed the CLA
  • Lint and unit tests pass locally with my changes ($ make test)
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • Any dependent changes have been merged and published in downstream modules

Related issues

Further comments

cmd/utils/flags.go Outdated Show resolved Hide resolved
@@ -67,6 +67,11 @@ Make sure you backup your keys regularly.`,
utils.SingleDBFlag,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it necessary theses options related with DB for accountcmd?
@winnie-byun Please check the history and if not please remove all.

@@ -40,8 +41,11 @@ var (
Name: "attach",
Usage: "Start an interactive JavaScript environment (connect to node)",
ArgsUsage: "[endpoint]",
Flags: append(ConsoleFlags, utils.DbTypeFlag, utils.SingleDBFlag, utils.NumStateTrieShardsFlag, utils.LevelDBCompressionTypeFlag, utils.DataDirFlag),
Category: "CONSOLE COMMANDS",
Flags: append(ConsoleFlags, utils.SingleDBFlag, utils.DataDirFlag, utils.NumStateTrieShardsFlag,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it necessary theses options related with DB for consolecmd?
@winnie-byun Please check the history and if not please remove all.

@@ -214,7 +214,7 @@ var (
}
DynamoDBTableNameFlag = cli.StringFlag{
Name: "db.dynamo.tablename",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we need to change db.dynamo to db.dynamos3?

Copy link
Contributor Author

@joowon-byun joowon-byun Aug 13, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If a user wants to use dynamoDB, one needs to set --dbtype DynamoDBS3. I thought this change will alert users that both dynamoDB and S3 will be created.
Do you think changing db.dynamo to db.dynamos3 is necessary in all codes?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Though this is not that necessarily, I think this can confuse users because if you want to use dynamodb, you need to user the word "dynamos3". However, to set up configuration, what used is "dynamo". I think it's up to you 😅

storage/database/interface.go Show resolved Hide resolved
storage/database/dynamodb.go Outdated Show resolved Hide resolved
@joowon-byun joowon-byun merged commit 0f2886d into klaytn:dev Aug 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants