Skip to content

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

@codecov-io
Copy link

codecov-io commented Nov 2, 2020

Codecov Report

Merging #546 into v2.0.0 will decrease coverage by 0.28%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           v2.0.0     #546      +/-   ##
==========================================
- Coverage   24.65%   24.37%   -0.29%     
==========================================
  Files          48       47       -1     
  Lines        5614     4887     -727     
==========================================
- Hits         1384     1191     -193     
+ Misses       4033     3504     -529     
+ Partials      197      192       -5     
Impacted Files Coverage Δ
consumer/mock_offset_store.go 57.14% <ø> (+7.14%) ⬆️
consumer/offset_store.go 64.39% <100.00%> (-0.29%) ⬇️
internal/utils/net.go 40.00% <0.00%> (-7.37%) ⬇️
consumer/lock.go 33.33% <0.00%> (-6.67%) ⬇️
internal/remote/tcp_conn.go 60.00% <0.00%> (-6.67%) ⬇️
internal/model.go 43.37% <0.00%> (-3.37%) ⬇️
internal/remote/codec.go 57.14% <0.00%> (-2.94%) ⬇️
producer/selector.go 71.05% <0.00%> (-2.87%) ⬇️
consumer/strategy.go 72.72% <0.00%> (-2.64%) ⬇️
internal/remote/remote_client.go 50.63% <0.00%> (-2.48%) ⬇️
... and 40 more

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 be57995...bcce742. Read the comment docs.

@ShannonDing
Copy link
Member

Hi, could you pls check this issue in the master, and move the pr to master.

@feiquan123
Copy link
Contributor Author

ok, master branch too. I will move the pr to master.

@ShannonDing
Copy link
Member

duplicate with #550

@ShannonDing ShannonDing closed this Nov 4, 2020
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.

3 participants