Skip to content

Commit

Permalink
fix(flag): actually increase buffer size to 100 (#79196)
Browse files Browse the repository at this point in the history
and remove the default buffer size
  • Loading branch information
michellewzhang authored Oct 16, 2024
1 parent 6e88055 commit 0f87ce6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion static/app/actionCreators/organization.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 2 additions & 3 deletions static/app/utils/featureObserver.ts
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -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;

Expand Down

0 comments on commit 0f87ce6

Please sign in to comment.