Error in RouterOS BGP Best Path Selection Algorithm Documentation?

According to MikroTik documentaion, the BGP best path selection algorithm does not take the IGP shortest path to the next hop into account:

https://wiki.mikrotik.com/wiki/Manual:BGP_Best_Path_Selection_Algorithm

Is this a documentation error or does it reflect the actual implementation in RouterOS?

If it would reflect the implementation on RouterOS, you could not use Mikrotik MPLS and iBGP in all topologies which have multiple BGP paths (multiple BGP next hops) for a given destination prefix. RouterOS would select one of the routes ignoring any differing IGP metrics. This would result in suboptimal routing path selection within RouterOS based MPLS or iBGP clouds.

Furthermore, it would also not be in compliance with RFC4271 (A Border Gateway Protocol 4)

https://tools.ietf.org/html/rfc4271

9.1.2.2. Breaking Ties (Phase 2)

In its Adj-RIBs-In, a BGP speaker may have several routes to the same
destination that have the same degree of preference. The local
speaker can select only one of these routes for inclusion in the
associated Loc-RIB. (…)

e) Remove from consideration any routes with less-preferred
interior cost. The interior cost of a route is determined by
calculating the metric to the NEXT_HOP for the route using the
Routing Table.

Documentation is - shockingly - correct. RouterOS is not RFC4271 compliant. Everbody who has redundant BGP paths should be warned not to use RouterOS, as it will result in random path selections since IGP metrics are ignored.

https://wiki.mikrotik.com/wiki/Manual:BGP_HowTo_%26_FAQ#Question:_What_are_the_specifics_of_MT_BGP_route_selection_algorithm.3F

Question: What are the specifics of MT BGP route selection algorithm?

The algorithm is described here. The algorithm follows BGP RFC closely, with a few differences:

  • Cisco-style weight is used as the first and most important selection criteria;
  • AS path length comparison can be turned off by a configuration parameter;
  • locally originated BGP routes are preferred in case of same AS path length, weight, and local-preference values;
  • interior cost calculation and comparison step is skipped.

The algorithm is used only to compare BGP routes from the same BGP instance. For different instances, only “distance” attributes are compared.