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 #544] Fix bug, concurrent map read and map write local offest file #550

Merged
merged 9 commits into from
Jan 15, 2021

Conversation

feiquan123
Copy link
Contributor

What is the purpose of the change

avoid fatal error: concurrent map read and map write

Brief changelog

use sync.Map to save localFileOffsetStore.OffsetTable info.

Verifying this change

go test . -v --run TestNewLocalFileOffsetStore pass
go test . -v --run TestLocalFileOffsetStore pass

@feiquan123
Copy link
Contributor Author

I had verified this feature. It working in produce env.

current gomod file:

replace (
	github.com/apache/rocketmq-client-go/v2 => github.com/feiquan123/rocketmq-client-go/v2 v2.2.0
)

When will next version be released? I want to use github.com/apache/rocketmq-client-go/v2

@codecov-io
Copy link

codecov-io commented Nov 11, 2020

Codecov Report

Merging #550 (07db62b) into master (e1d9be8) will increase coverage by 0.12%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #550      +/-   ##
==========================================
+ Coverage   24.21%   24.33%   +0.12%     
==========================================
  Files          48       48              
  Lines        5010     5018       +8     
==========================================
+ Hits         1213     1221       +8     
  Misses       3598     3598              
  Partials      199      199              
Impacted Files Coverage Δ
consumer/offset_store.go 65.09% <100.00%> (+1.19%) ⬆️
consumer/push_consumer.go 11.46% <0.00%> (+0.12%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e1d9be8...07db62b. Read the comment docs.

@xujianhai666
Copy link
Member

why ther are some change to readme.md ? plz keep code clean. @feiquan123

README.md Outdated
@@ -53,3 +53,4 @@ For 2.0.0 version, it supports:
----------
## License
[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html) Copyright (C) Apache Software Foundation

Copy link
Member

Choose a reason for hiding this comment

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

extra line, remove that

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sorry, the space line autoadd by vscode.😞

@xujianhai666
Copy link
Member

@xujianhai666 xujianhai666 changed the title FIX:fatal error: concurrent map read and map write(apache#544) fix: concurrent map read and map write bug (#544) Dec 9, 2020
@xujianhai666
Copy link
Member

remember to squish commits to one

@feiquan123 feiquan123 changed the title fix: concurrent map read and map write bug (#544) [ISSUE #544] Fix bug, concurrent map read and map write local offest file. Dec 14, 2020
@feiquan123 feiquan123 changed the title [ISSUE #544] Fix bug, concurrent map read and map write local offest file. [ISSUE #544] Fix bug, concurrent map read and map write local offest file Dec 14, 2020
@ShannonDing ShannonDing added the enhancement New feature or request label Jan 15, 2021
@ShannonDing ShannonDing merged commit f1e366e into apache:master Jan 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants