WIP: object: Add priority metric based on geo distance #1640
No reviewers
Labels
No labels
P0
P1
P2
P3
badger
frostfs-adm
frostfs-cli
frostfs-ir
frostfs-lens
frostfs-node
good first issue
triage
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#1640
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "acid-ant/frostfs-node:feature/metric-geo-distance"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
New metric
$geoDistance
uses geo distance between two nodes. Distance calculation based on information from locodedb and node attributeUN-LOCODE
.Signed-off-by: Anton Nikiforov an.nikiforov@yadro.com
5494320fb3
toed3e0244e9
ed3e0244e9
toff6449c6c7
ff6449c6c7
tod2ebed13c4
d2ebed13c4
toc4e5e33650
c4e5e33650
to98d690063c
WIP: object: Add priority metric based on geo distanceto object: Add priority metric based on geo distance@ -685,3 +688,3 @@
}
err := c.readConfig(appCfg)
relayOnly := nodeconfig.Relay(appCfg)
I think all this code could be moved to
initLocalNodeInfo
@ -688,0 +705,4 @@
},
locodebolt.ReadOnly(),
)
err := locodeDB.Open()
I think frostfs-node should not open locode db, if config has no $geoDistance priority
@ -44,0 +78,4 @@
// the value of attribute is the same. In other case return [1].
func (gm *geoDistanceMetric) CalculateValue(_ *netmap.NodeInfo, to *netmap.NodeInfo) (int, error) {
tl := to.LOCODE()
if v, ok := gm.distance[tl]; ok {
mtx.RLock
required@ -44,0 +125,4 @@
dist := math.Sin(radLat1)*math.Sin(radLat2) + math.Cos(radLat1)*math.Cos(radLat2)*math.Cos(radTheta)
if dist > 1 {
Should
dist < -1
be checked?object: Add priority metric based on geo distanceto WIP: object: Add priority metric based on geo distanceView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.