Skip to content

lib: use map for worker mapping in cluster

In cluster master, we were using Object for storing workerId and iterating on values and deciding the logic based on the length etc. For such use-cases, Map is a better fit than an Object. As we don't have to recompute the keys every time for length purposes and the same benefits of lookup and deletion in O(1) (average case basis).

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

Merge request reports

Loading