Skip to content

[DRAFT][CodeMod] Rename fields for clarity#10616

Draft
riversand963 wants to merge 1 commit into
facebook:mainfrom
riversand963:refactor-ParsedInternalKey
Draft

[DRAFT][CodeMod] Rename fields for clarity#10616
riversand963 wants to merge 1 commit into
facebook:mainfrom
riversand963:refactor-ParsedInternalKey

Conversation

@riversand963

Copy link
Copy Markdown
Contributor

This PR is the result of applying IDE's built-in "refactor" functionality,
i.e., automatic variable/function renaming. Nothing manual.

We updated the names of a few widely used variables and functions to explicitly
state whether timestamp is included. I hope we can ultimately apply
compile-time type checks to distinguish between user keys with and without
timestamps, but that may involve incompatible API change. This is a first step
towards the direction, though I don't know whether we will change the API or not
at this point.

Test plan
make check

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@riversand963 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@riversand963

Copy link
Copy Markdown
Contributor Author

Some touch-ups will be necessary.

@riversand963 riversand963 force-pushed the refactor-ParsedInternalKey branch from 460ee4a to 867174b Compare August 31, 2022 16:28
@facebook-github-bot

Copy link
Copy Markdown
Contributor

@riversand963 has updated the pull request. You must reimport the pull request before landing.

@riversand963 riversand963 marked this pull request as draft August 31, 2022 16:35
@riversand963 riversand963 changed the title [CodeMod] Rename fields for clarity Aug 31, 2022
This PR is the result of applying IDE's built-in "refactor" functionality,
i.e., automatic variable/function renaming. Nothing manual.

We updated the names of a few widely used variables and functions to explicitly
state whether timestamp is included. I hope we can ultimately apply
compile-time type checks to distinguish between user keys with and without
timestamps, but that may involve incompatible API change. This is a first step
towards the direction, though I don't know whether we will change the API or not
at this point.

```
ParsedInternalKey::user_key ==> user_key_with_ts
LookupKey::user_key ==> user_key_with_ts
InternalKey::user_key ==> user_key_with_ts
IterKey::GetUserKey ==> GetUserKeyWithTs
```

Test plan
make check
@riversand963 riversand963 force-pushed the refactor-ParsedInternalKey branch from 867174b to 74cd90d Compare August 31, 2022 20:36
@facebook-github-bot

Copy link
Copy Markdown
Contributor

@riversand963 has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot

Copy link
Copy Markdown
Contributor

Hi @riversand963!

Thank you for your pull request.

We require contributors to sign our Contributor License Agreement, and yours needs attention.

You currently have a record in our system, but the CLA is no longer valid, and will need to be resubmitted.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants