Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
fix(tarball): use rwlock instead of dashmap to avoid potential deadlock #200
base: main
Are you sure you want to change the base?
fix(tarball): use rwlock instead of dashmap to avoid potential deadlock #200
Changes from 3 commits
48e0fe7
37f2f22
0471299
af9e68c
a6e7661
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before rebase the branch main, i.e. without mock-registry, the test passed, but now it doesn't seem to be able to install
express
, so it will take a bit more time to see what's going on.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if
MemoMap
can be sent across async? Since the cache is growth only.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like it is perfect for our scene. I just tried
memo-map
on this branch, and it works well.I've also tried integrated-benchmark on the branch
main
,fix-mem-cache-deadlock
, andrefactor-use-memo-map
, here is the result on my local machine:It seems that integrated-benchmark on the branch
main
will get a deadlock currently, so there's no comparison to themain
branch.Overall, thanks for your suggestion,
it would be better to useI don't know if we should usememo-map
, If there's no problem on your end, I think we can just use it ~memo-map
here, it looks likeRwLock
for clean-install would be a little better?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Frozen lockfile doesn't use memory cache so it's irrelevant (It invokes
run_without_mem_cache
).The
integrated-benchmark
script has a--fixture-dir/-D
option, you may use it to specify a biggerpackage.json
file.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for this package.json:
Run
just integrated-benchmark fix-mem-cache-deadlock refactor-use-memo-map -s=clean-install -D=/Users/await-ovo/Documents/test/test-pnpm/alotta-modules
show that:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to use this package.json to do a benchmark, but there will be a
Too many open files
error during install.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try a smaller one, for example:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, this will get an error:
Maybe we should test the benchmark with a bigger repository after this is resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you try combine your branches with #210 into 2 new branches and see if the "too many open files" error still exist? If the error disappear, can you try benchmark them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried, but I still can't get the results of integrated-benchmark, it seems to be because of a circular dependency in alotta-files?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zkochan It seems pacquet can't yet handle circular dependencies (without lockfile). Can you tell us which is the circular dependencies to remove?
Also, @await-ovo, another PR was just merged, you should pull from upstream or rebase.