Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix index backfilling frequency. #6585

Merged
merged 3 commits into from Sep 7, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/firestore/src/local/index_backfiller.ts
Expand Up @@ -35,10 +35,10 @@ import { isIndexedDbTransactionError } from './simple_db';
const LOG_TAG = 'IndexBackiller';

/** How long we wait to try running index backfill after SDK initialization. */
const INITIAL_BACKFILL_DELAY_MS = 15;
const INITIAL_BACKFILL_DELAY_MS = 15 * 1000;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I think '15_000' is a cleaner way to write this.


/** Minimum amount of time between backfill checks, after the first one. */
const REGULAR_BACKFILL_DELAY_MS = 1;
const REGULAR_BACKFILL_DELAY_MS = 60 * 1000;

/** The maximum number of documents to process each time backfill() is called. */
const MAX_DOCUMENTS_TO_PROCESS = 50;
Expand Down