BGP route election bug

Hello guys,

I am ruuning RouterOS 5.21 on my core MikroTik x86 router and I have some problems about setting up the main-backup relationship between default originate available routes for outgoing traffic.

[sysadmin@MikroTik] > /ip route print detail                                       
Flags: X - disabled, A - active, D - dynamic, 
C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme, 
B - blackhole, U - unreachable, P - prohibit 
 0 ADb  dst-address=0.0.0.0/0 gateway=x.x.x.x 
        gateway-status=x.x.x.x reachable via  vlan_directone_extern2 
        distance=20 scope=40 target-scope=10 bgp-as-path="zzzzz" bgp-weight=70 
        bgp-local-pref=70 bgp-med=0 bgp-origin=igp bgp-communities="" 
        received-from=do extern2 

 1  Db  dst-address=0.0.0.0/0 gateway=y.y.y.y 
        gateway-status=y.y.y.y reachable via  vlan_directone_extern 
        distance=20 scope=40 target-scope=10 bgp-as-path="zzzzz" bgp-weight=400 
        bgp-local-pref=400 bgp-med=0 bgp-origin=igp bgp-communities="" 
        received-from=do extern

How can a route with lower weight and local-pref be elected as active in despite of a route with higher values of them, and the same dst-address, distance, scope, traget-scope and bgp-as-path?

Thank you for accorded time!

Best regards,
Doru

Both peers are running on the same instance?

Nope. Different peers and instances here.

If instances are different then BGP route election algorithm doe snot apply. It is used only between routes form the same instance.