bilibili / bilibili/gengine

concurrent map writes

Open
#12 9 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
2.1k
Forks
281
PR merge metrics
No merged PRs in 30d

Description

debug模式下
-----------------------------------------------------------------------------------------------
context/data_context.go:371 ==> Vars[variable] = newValue.
限制同时10个50个goroutinue并发请求,均出现过concurrent map writes,map读写问题。

请求场景:
func API(ctx context.Context, req *Request) error {
data := make(map[string]interface{})
data["req"] = req
data["stg_name"] = &stgName

err, _ = engine.EngPool.ExecuteSelectedRules(data, stgRule)
// do sth ...
}

release并未发现。

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at context/data_context.go:371, where Vars[variable] = newValue is reported, and reproduce the issue in debug mode with 10–50 concurrent goroutines using the API and ExecuteSelectedRules scenario from the report. Done means the concurrent request case no longer produces a Go concurrent map writes failure; verify the release behavior as well.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.