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

feat: add FeatureDB vpc privatelink support #43

Merged
merged 6 commits into from
Feb 11, 2025
Merged

Conversation

Yifshao
Copy link
Collaborator

@Yifshao Yifshao commented Jan 22, 2025

No description provided.

@Yifshao Yifshao requested a review from bruceding January 22, 2025 07:37
@@ -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()
Copy link
Collaborator

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, 是不是异步线程监听切换就好了。

Copy link
Collaborator

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

return
}
retryCount++
resp, err := f.Client.Do(req)
Copy link
Collaborator

Choose a reason for hiding this comment

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

这里需不需要resp body 显示的 close 下?

@Yifshao Yifshao merged commit e446787 into master Feb 11, 2025
1 check passed
@Yifshao Yifshao deleted the feature/fdb_pvl branch February 11, 2025 02:49
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.

2 participants