• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

optimizely / javascript-sdk / 18291386101

06 Oct 2025 06:57PM UTC coverage: 78.946% (-0.05%) from 78.991%
18291386101

push

github

web-flow
[FSSDK-11898] serialize concurrent cmab service calls (#1086)

The cmab service caches the results of a cmab prediction retrieve
from the server and returns it for subsequent call. This ensures
a consistent value is returned for getDecision() within the cache ttl.
However, when there is no cached value, if there is concurrent calls
to gertDecision() for same userId and ruleId combination, all of these
will cause a call to the server and may potentially return different
values.

The solution is to run concurrent calls for same userId and ruleId
combinations one after another. To achieve this, we put each (userId, ruleId)
combination in one of the predefined bucktes by hashing the
(userId, ruleId) combination and serialize all calls for that
particular hash % (num_buckets).

1457 of 2790 branches covered (52.22%)

Branch coverage included in aggregate %.

6 of 15 new or added lines in 2 files covered. (40.0%)

8832 of 10243 relevant lines covered (86.22%)

337.13 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

40.0
packages/optimizely-sdk/lib/utils/executor/serial_runner.ts


Source Not Available

The file "lib/utils/executor/serial_runner.ts" isn't available on github. Either it's been removed, or the repo root directory needs to be updated.

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc