Skip to content

Make item public. Add a new onReject call for rejected items.#180

Merged
manishrjain merged 2 commits intomasterfrom
mrjn/onReject
Aug 17, 2020
Merged

Make item public. Add a new onReject call for rejected items.#180
manishrjain merged 2 commits intomasterfrom
mrjn/onReject

Conversation

@manishrjain
Copy link
Contributor

@manishrjain manishrjain commented Aug 17, 2020

  • Making Item public makes the onEvict and onReject function calls more readable.
  • Adding onReject allows us to tightly track every Set that happens, so we can avoid memory leaks in manually allocated memory.

This change is Reviewable

Copy link
Contributor

@jarifibrahim jarifibrahim left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: 0 of 6 files reviewed, all discussions resolved (waiting on @anurags92, @karlmcguire, and @martinmr)

Copy link
Contributor

@jarifibrahim jarifibrahim left a comment

Choose a reason for hiding this comment

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

@anurags92 will add tests later.

Reviewable status: 0 of 6 files reviewed, all discussions resolved (waiting on @anurags92, @karlmcguire, and @martinmr)

Copy link
Contributor

@all-seeing-code all-seeing-code left a comment

Choose a reason for hiding this comment

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

Ok.

Reviewable status: 0 of 6 files reviewed, all discussions resolved (waiting on @anurags92, @karlmcguire, and @martinmr)

Copy link
Contributor

@all-seeing-code all-seeing-code left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: 0 of 6 files reviewed, all discussions resolved (waiting on @anurags92, @karlmcguire, and @martinmr)

@manishrjain manishrjain merged commit 18e2797 into master Aug 17, 2020
@manishrjain manishrjain deleted the mrjn/onReject branch August 17, 2020 12:49
@jarifibrahim
Copy link
Contributor

The TestDropUpdates works fine locally. It could be a Travis issue (the test has a time.Sleep) or a go 1.12 .
@anurags92 @jarifibrahim to investigate it later.

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.

3 participants