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

[ISSUE#5331] Fix windows can't move file when mmapped. #5434

Merged
merged 1 commit into from
Nov 3, 2022

Conversation

echooymxq
Copy link
Contributor

Make sure set the target branch to develop

What is the purpose of the change

Link #5331

Failed tests: 
  CompactionLogTest.testReplaceFiles:259->lambda$testReplaceFiles$3:260

https://github.com/apache/rocketmq/actions/runs/3335676387/jobs/5520208604

Brief changelog

XX

Verifying this change

XXXX

Follow this checklist to help us incorporate your contribution quickly and easily. Notice, it would be helpful if you could finish the following 5 checklist(the last one is not necessary)before request the community to review your PR.

  • Make sure there is a Github issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • Format the pull request title like [ISSUE #123] Fix UnknownException when host config not exist. Each commit in the pull request should have a meaningful subject line and body.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Write necessary unit-test(over 80% coverage) to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in test module.
  • Run mvn -B clean apache-rat:check findbugs:findbugs checkstyle:checkstyle to make sure basic checks pass. Run mvn clean install -DskipITs to make sure unit-test pass. Run mvn clean test-compile failsafe:integration-test to make sure integration-test pass.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

@RongtongJin RongtongJin changed the title Fix windows can't move file when mmapped. [ISSUE#5331] Fix windows can't move file when mmapped. Nov 1, 2022
@lizhanhui
Copy link
Contributor

Looks like we cannot verify the fix in CI as it keeps failing...

@echooymxq
Copy link
Contributor Author

Looks like we cannot verify the fix in CI as it keeps failing...

The ci failed because of other unstable tests, i will fixing in other prs, you can verify it if you use windows. But this change point is notable, it will cause jvm crash when use the mmaped buffer if has cleaned, so i remapped here.
@lizhanhui @ltamber Can help reveiw it?

@lizhanhui
Copy link
Contributor

@echooymxq Let's work it out this way: PR5345 makes all pipelines pass through conditionally skipping test cases that are not compatible with Windows at the present. Let's merge that pull request first, then rebase this pull request, which essentially fixes some failing cases.

@lizhanhui
Copy link
Contributor

Looks like we cannot verify the fix in CI as it keeps failing...

The ci failed because of other unstable tests, i will fixing in other prs, you can verify it if you use windows. But this change point is notable, it will cause jvm crash when use the mmaped buffer if has cleaned, so i remapped here. @lizhanhui @ltamber Can help reveiw it?

This pull request itself is good and helpful. As I just replied, let's merge it after pull-request 5345

@codecov-commenter
Copy link

codecov-commenter commented Nov 3, 2022

Codecov Report

Merging #5434 (b034a5f) into develop (61fa3b0) will decrease coverage by 0.01%.
The diff coverage is 12.50%.

@@              Coverage Diff              @@
##             develop    #5434      +/-   ##
=============================================
- Coverage      43.18%   43.17%   -0.02%     
- Complexity      8070     8073       +3     
=============================================
  Files           1025     1025              
  Lines          72177    72194      +17     
  Branches        9558     9560       +2     
=============================================
  Hits           31173    31173              
- Misses         37064    37086      +22     
+ Partials        3940     3935       -5     
Impacted Files Coverage Δ
...ache/rocketmq/store/logfile/DefaultMappedFile.java 44.03% <12.50%> (-1.81%) ⬇️
...va/org/apache/rocketmq/store/FlushDiskWatcher.java 81.25% <0.00%> (-9.38%) ⬇️
...apache/rocketmq/remoting/netty/ResponseFuture.java 77.55% <0.00%> (-4.09%) ⬇️
...rocketmq/remoting/netty/NettyRemotingAbstract.java 49.27% <0.00%> (-3.63%) ⬇️
...a/org/apache/rocketmq/filter/util/BloomFilter.java 60.43% <0.00%> (-2.20%) ⬇️
...mq/store/ha/autoswitch/AutoSwitchHAConnection.java 70.43% <0.00%> (-0.81%) ⬇️
...he/rocketmq/controller/impl/DLedgerController.java 65.96% <0.00%> (-0.53%) ⬇️
...ent/impl/consumer/DefaultLitePullConsumerImpl.java 69.00% <0.00%> (-0.16%) ⬇️
...a/org/apache/rocketmq/store/StoreStatsService.java 36.18% <0.00%> (+1.10%) ⬆️
.../apache/rocketmq/controller/ControllerManager.java 75.26% <0.00%> (+2.15%) ⬆️
... and 3 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@echooymxq
Copy link
Contributor Author

Got it.

@lizhanhui lizhanhui merged commit d7321fe into apache:develop Nov 3, 2022
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

3 participants