fresh-application-65175
02/24/2025, 11:03 AMBuild: 3.4.0+5957d6e (2025-01-17)
• ReactSDK "@growthbook/growthbook-react": "^1.4.1",
// Create a GrowthBook instance
const growthbook = new GrowthBook({
apiHost: <host>,
clientKey: "sdk-key",
enableDevMode: true,
stickyBucketService: new LocalStorageStickyBucketService(),
});
• Pro plan is enabled
• Settings > General > Sticky Bucketing Enabled ✅
Steps to reproduce
1. Create feature
2. Create experiment with two variants A, B
3. Hash attribute id
4. Set weights A=100, B=0
5. Using react SDK always send static id
attribute (user1
)
6. Receive variant A
7. Update weights A=0,B=100
8. Send evaluation with same attributes
Actual Result
Received variant B
Expected Result
Received same variant A
Would appreciate any help to troubleshoot
We also tested on PythonSDK with custom StickyBucketing service - same behaviourfresh-application-65175
02/24/2025, 11:03 AMgbFeaturesCache
[
[
"https://<host>||sdk-xDZ6yW1x9Uw9HUkQ",
{
"data": {
"features": {
"test_sticky_2": {
"defaultValue": {},
"rules": [
{
"coverage": 1,
"hashAttribute": "id",
"bucketVersion": 4,
"seed": "697b3444-8061-47f2-9bc6-10f70d93e178",
"hashVersion": 2,
"variations": [
{
"A": "A"
},
{
"B": "B"
}
],
"weights": [
0,
1
],
"key": "test_sticky_2",
"meta": [
{
"key": "0",
"name": "A"
},
{
"key": "1",
"name": "B"
}
],
"phase": "7",
"name": "test_sticky_2"
}
]
}
},
"dateUpdated": "2025-02-24T10:52:47.904Z"
},
"version": "2025-02-24T10:52:47.904Z",
"staleAt": "2025-02-24T11:02:33.021Z",
"sse": true
}
]
]
fresh-application-65175
02/24/2025, 11:03 AMgbStickyBuckets__id||user1
{
"attributeName": "id",
"attributeValue": "user1",
"assignments": {
"test_sticky_2__1": "0"
}
}
fresh-football-47124
happy-autumn-40938
02/25/2025, 6:33 AM"test_sticky_2__1":"0"
is only assigned "0" (control) is using a stale cache key ("1" from __1
). Your experiment definition however is already on cache key "4" ("bucketVersion": 4,
). Basically your sticky buckets were forcibly invalidated after you made the variation weight changes.
As for why... generally when you shift variation weights around, the GB statistics engine doesn't work well when user traffic split deviates from the expected weights (except in the context of a Bandit which has special logic for fixing the stats). To avoid statistical issues, the GB app will often take a conservative approach to managing the problem - recommending that you choose the "New phase, re-randomize traffic" release plan when changing variation weights, which forcibly invalidates sticky buckets. If you know what you're doing though and are ok incurring the statistical penalty, there's an escape hatch that lets you change variation weights while keeping previous sticky buckets. When going through the "Make Changes" flow, choose "Advanced: multiple changes at once" and then make your weight changes — new release plans are available. The one you'd likely want to choose is "Same phase, apply changes to new traffic only (Sticky Bucketing)".fresh-application-65175
02/25/2025, 8:53 AMhappy-autumn-40938
02/25/2025, 9:23 AMfresh-application-65175
02/25/2025, 9:27 AMhappy-autumn-40938
02/25/2025, 9:29 AMfresh-application-65175
02/25/2025, 9:31 AMhappy-autumn-40938
02/25/2025, 9:33 AMhappy-autumn-40938
02/25/2025, 9:35 AMfresh-application-65175
02/25/2025, 9:35 AM