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

Inmemory reclaim #23 #24

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Dahaden
Copy link
Contributor

@Dahaden Dahaden commented Nov 11, 2020

This allows us to keep a reference to localstorage for reclaim purposes even when localstorage is full.

Carrying on from #20

When creating an instance of localstorage-retry, Store will grab the defaultEngine and use this for the originalEngine which is used to drive the reclaim mechanism

My assumption inside of the last PR was that defaultEngine would always be localstorage. However, engine runs a check and assigns the store to localstorage or inmemory before the module is resolved.

This means, if localstorage is so full that we cant insert a uuid and "test_value", then we will only ever run reclaim against the inmemory engine.

lib/engine.js Outdated
@@ -57,7 +57,30 @@ function pickStorage() {
return inMemoryStore;
}

function isReadSupportedNatively() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

In theory this is not needed if the prior isSupportedNatively is true but wasnt keen on leaking information between the two tests

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in the last commit where we now have these isSupportedNatively functions storing the result in a var to be used

@Dahaden
Copy link
Contributor Author

Dahaden commented Nov 11, 2020

@bryanmikaelian Are you able to check this out if you get a chance? Thanks :)

Also unsure why I cant ping Pooya Jaferian who I have been told is a contact for us in the past

@pooyaj
Copy link

pooyaj commented Nov 13, 2020

@Dahaden Thanks for sending the PR. I think probably can only ping people who contributed to the repo ... I will take a look at the PR in the next few days

@Dahaden
Copy link
Contributor Author

Dahaden commented Nov 30, 2020

@pooyaj Just following up, any chance for a quick look?
Also added another quick one to give us some more insight into the discarding of messages :)
#26

1 similar comment
@Dahaden
Copy link
Contributor Author

Dahaden commented Dec 9, 2020

@pooyaj Just following up, any chance for a quick look?
Also added another quick one to give us some more insight into the discarding of messages :)
#26

@Dahaden
Copy link
Contributor Author

Dahaden commented Jan 5, 2021

Happy new year @pooyaj and @bryanmikaelian
Is there any chance for a quick look at this PR? Sorry just want to make sure it hasnt fallen off your radar :)
Thanks!
Dave

@pooyaj
Copy link

pooyaj commented Jan 5, 2021

Happy new year @Dahaden! Sorry for the delay on this, we are working against few release deadlines, but will try to squeeze this in hopefully during the second half of Jan.

@Dahaden
Copy link
Contributor Author

Dahaden commented Jan 5, 2021

No worries :) thanks for the update!
Good luck!

@Dahaden
Copy link
Contributor Author

Dahaden commented Feb 16, 2021

Hey @pooyaj and @bryanmikaelian !
Hope all your releases went well!
Sorry just wanting to check in on timing of this PR.
Thanks :)

@Dahaden
Copy link
Contributor Author

Dahaden commented Mar 11, 2021

Hey @pooyaj We are seeing many issues from event duplications and have raised two more PRs as part of #27
Are we able to get these reviewed at some point please?

Dave added 3 commits March 12, 2021 10:03
@Dahaden Dahaden force-pushed the inmemory-reclaim-#23 branch from 5f0328f to 1b6f52a Compare March 11, 2021 23:04
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.

2 participants