-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: add FeatureDB vpc privatelink support #43
Conversation
dao/feature_view_featuredb_dao.go
Outdated
@@ -110,23 +105,51 @@ func (d *FeatureViewFeatureDBDao) GetFeatures(keys []interface{}, selectFields [ | |||
pkeys = append(pkeys, utils.ToString(k, "")) | |||
} | |||
body, _ := json.Marshal(map[string]any{"keys": pkeys}) | |||
d.featureDBClient.AddressMutex.RLock() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里用锁,感觉不是特别高效。 而且代码有点冗余散落到各处。 是不是直接提供 GetCurrentAddress, 如果失败的话, 获取 GetNextAddress 就可以了。 至于 内部的 current address, next address, 是不是异步线程监听切换就好了。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
d.featureDBClient.CheckVpcAddress(3) 这个阻塞的切换有点耗RT
datasource/featuredb/featuredb.go
Outdated
return | ||
} | ||
retryCount++ | ||
resp, err := f.Client.Do(req) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里需不需要resp body 显示的 close 下?
No description provided.