mirror of
https://github.com/Syngnat/GoNavi.git
synced 2026-08-18 12:54:08 +08:00
🐛 fix(query): 放开所有数据源默认查询超时
- 区分连接超时与查询超时,默认查询仅保留手动取消能力 - 清理各数据库及 HTTP 数据源由连接配置派生的请求超时 - 新增按请求 queryTimeout 透传并保留计数任务显式时限 - 补充前后端、缓存键与多驱动超时策略回归测试
This commit is contained in:
@@ -201,8 +201,11 @@ func (i *IoTDBDB) QueryContext(ctx context.Context, query string) ([]map[string]
|
||||
if text == "" {
|
||||
return nil, nil, fmt.Errorf("查询语句不能为空")
|
||||
}
|
||||
timeoutMs := int64(i.effectiveTimeout().Milliseconds())
|
||||
ds, err := i.session.Query(ctx, text, &timeoutMs)
|
||||
var timeoutMs *int64
|
||||
if remaining := timeoutMsFromContext(ctx); remaining > 0 {
|
||||
timeoutMs = &remaining
|
||||
}
|
||||
ds, err := i.session.Query(ctx, text, timeoutMs)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user