Browse Source

fix(flag): actually increase buffer size to 100 (#79196)

and remove the default buffer size
Michelle Zhang 4 months ago
parent
commit
0f87ce6a93
2 changed files with 3 additions and 4 deletions
  1. 1 1
      static/app/actionCreators/organization.tsx
  2. 2 3
      static/app/utils/featureObserver.ts

+ 1 - 1
static/app/actionCreators/organization.tsx

@@ -42,7 +42,7 @@ async function fetchOrg(
   }
 
   FeatureFlagOverrides.singleton().loadOrg(org);
-  FeatureObserver.singleton().observeFlags({organization: org, bufferSize: 10});
+  FeatureObserver.singleton().observeFlags({organization: org, bufferSize: 100});
 
   OrganizationStore.onUpdate(org, {replace: true});
   setActiveOrganization(org);

+ 2 - 3
static/app/utils/featureObserver.ts

@@ -1,7 +1,6 @@
 import type {Flags} from 'sentry/types/event';
 import type {Organization} from 'sentry/types/organization';
 
-const DEFAULT_BUFFER_SIZE = 100;
 let __SINGLETON: FeatureObserver | null = null;
 
 export default class FeatureObserver {
@@ -27,10 +26,10 @@ export default class FeatureObserver {
 
   public observeFlags({
     organization,
-    bufferSize = DEFAULT_BUFFER_SIZE,
+    bufferSize,
   }: {
+    bufferSize: number;
     organization: Organization;
-    bufferSize?: number;
   }) {
     const FLAGS = this.FEATURE_FLAGS;