Skip to content

Commit 2575fcc

Browse files
committed
remove console.log.
1 parent 8d2536e commit 2575fcc

File tree

5 files changed

+2
-31
lines changed

5 files changed

+2
-31
lines changed

packages/firestore/src/local/indexeddb_document_overlay_cache.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ export class IndexedDbDocumentOverlayCache implements DocumentOverlayCache {
104104
largestBatchId: number,
105105
overlays: MutationMap
106106
): PersistencePromise<void> {
107-
console.log("in saveOverlays");
108107
const promises: Array<PersistencePromise<void>> = [];
109108
overlays.forEach((_, mutation) => {
110109
const overlay = new Overlay(largestBatchId, mutation);
@@ -213,7 +212,6 @@ export class IndexedDbDocumentOverlayCache implements DocumentOverlayCache {
213212
transaction: PersistenceTransaction,
214213
overlay: Overlay
215214
): PersistencePromise<void> {
216-
console.log("in saveOverlay");
217215
return documentOverlayStore(transaction).put(
218216
toDbDocumentOverlay(this.serializer, this.userId, overlay)
219217
);

packages/firestore/src/local/indexeddb_mutation_queue.ts

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,6 @@ export class IndexedDbMutationQueue implements MutationQueue {
356356
transaction: PersistenceTransaction,
357357
documentKeys: SortedMap<DocumentKey, unknown>
358358
): PersistencePromise<MutationBatch[]> {
359-
console.log("in getAllMutationBatchesAffectingDocumentKeys");
360359
let uniqueBatchIDs = new SortedSet<BatchId>(primitiveComparator);
361360

362361
const promises: Array<PersistencePromise<void>> = [];
@@ -372,9 +371,6 @@ export class IndexedDbMutationQueue implements MutationQueue {
372371
(indexKey, _, control) => {
373372
const [userID, encodedPath, batchID] = indexKey;
374373

375-
console.log("\t iterating documentMutationStore");
376-
console.log(`\t batchId=${batchID}`);
377-
378374
// Only consider rows matching exactly the specific key of
379375
// interest. Note that because we order by path first, and we
380376
// order terminators before path separators, we'll encounter all
@@ -395,10 +391,8 @@ export class IndexedDbMutationQueue implements MutationQueue {
395391
promises.push(promise);
396392
});
397393

398-
return PersistencePromise.waitFor(promises).next(() => {
399-
console.log(`uniqueBatchIDs.size=${uniqueBatchIDs.size}`);
400-
return this.lookupMutationBatches(transaction, uniqueBatchIDs)
401-
}
394+
return PersistencePromise.waitFor(promises).next(() =>
395+
this.lookupMutationBatches(transaction, uniqueBatchIDs)
402396
);
403397
}
404398

@@ -464,8 +458,6 @@ export class IndexedDbMutationQueue implements MutationQueue {
464458
transaction: PersistenceTransaction,
465459
batchIDs: SortedSet<BatchId>
466460
): PersistencePromise<MutationBatch[]> {
467-
console.log("in lookupMutationBatches");
468-
console.log(`\t batchIDs.size=${batchIDs.size}`);
469461
const results: MutationBatch[] = [];
470462
const promises: Array<PersistencePromise<void>> = [];
471463
// TODO(rockwood): Implement this using iterate.
@@ -485,7 +477,6 @@ export class IndexedDbMutationQueue implements MutationQueue {
485477
mutation.userId === this.userId,
486478
`Unexpected user '${mutation.userId}' for mutation batch ${batchId}`
487479
);
488-
console.log(`\t found mutation in mutationStore`);
489480
results.push(fromDbMutationBatch(this.serializer, mutation));
490481
})
491482
);

packages/firestore/src/local/indexeddb_persistence.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,6 @@ export class IndexedDbPersistence implements Persistence {
217217
private readonly forceOwningTab: boolean,
218218
private readonly schemaVersion = SCHEMA_VERSION
219219
) {
220-
console.log(`SCHEMA_VERSION=${schemaVersion}`);
221220
if (!IndexedDbPersistence.isAvailable()) {
222221
throw new FirestoreError(
223222
Code.UNIMPLEMENTED,

packages/firestore/src/local/indexeddb_schema_converter.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ export class SchemaConverter implements SimpleDbSchemaConverter {
143143
fromVersion: number,
144144
toVersion: number
145145
): PersistencePromise<void> {
146-
console.log(`in createOrUpgrade from ${fromVersion} to ${toVersion}`);
147146
debugAssert(
148147
fromVersion < toVersion &&
149148
fromVersion >= 0 &&
@@ -250,7 +249,6 @@ export class SchemaConverter implements SimpleDbSchemaConverter {
250249
}
251250

252251
if (fromVersion < 14 && toVersion >= 14) {
253-
console.log("about to runOverlayMigration");
254252
p = p.next(() => this.runOverlayMigration(db, simpleDbTransaction));
255253
}
256254

@@ -473,7 +471,6 @@ export class SchemaConverter implements SimpleDbSchemaConverter {
473471
db: IDBDatabase,
474472
transaction: SimpleDbTransaction
475473
): PersistencePromise<void> {
476-
console.log("in runOverlayMigration");
477474
const mutationsStore = transaction.store<
478475
DbMutationBatchKey,
479476
DbMutationBatch

packages/firestore/src/local/local_documents_view.ts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,6 @@ export class LocalDocumentsView {
215215
transaction: PersistenceTransaction,
216216
docs: MutableDocumentMap
217217
): PersistencePromise<void> {
218-
console.log("in recalculateAndSaveOverlays")
219218
const masks = newDocumentKeyMap<FieldMask | null>();
220219
// A reverse lookup map from batch id to the documents within that batch.
221220
let documentsByBatchId = new SortedMap<number, DocumentKeySet>(
@@ -225,13 +224,9 @@ export class LocalDocumentsView {
225224
return this.mutationQueue
226225
.getAllMutationBatchesAffectingDocumentKeys(transaction, docs)
227226
.next(batches => {
228-
console.log("back in recalculateAndSaveOverlays");
229-
console.log(`got ${batches.length} batches`);
230227
for (const batch of batches) {
231228
batch.keys().forEach(key => {
232-
console.log(`\t key=${key.toString()}`);
233229
const baseDoc = docs.get(key);
234-
console.log(`\t baseDoc=${baseDoc ? baseDoc.toString() : "null"}`);
235230
if (baseDoc === null) {
236231
return;
237232
}
@@ -249,29 +244,21 @@ export class LocalDocumentsView {
249244
}
250245
})
251246
.next(() => {
252-
console.log("documentsByBatchId=");
253-
console.log(documentsByBatchId);
254-
console.log("masks=");
255-
console.log(masks);
256247
const promises: Array<PersistencePromise<void>> = [];
257248
// Iterate in descending order of batch IDs, and skip documents that are
258249
// already saved.
259250
const iter = documentsByBatchId.getReverseIterator();
260251
while (iter.hasNext()) {
261-
console.log(`reverse iteration over documentsByBatchId`);
262252
const entry = iter.getNext();
263253
const batchId = entry.key;
264254
const keys = entry.value;
265-
console.log(`\t batchId=${batchId}`);
266-
console.log(`\t keys=${keys}`);
267255
const overlays = newMutationMap();
268256
keys.forEach(key => {
269257
if (!processed.has(key)) {
270258
const overlayMutation = calculateOverlayMutation(
271259
docs.get(key)!,
272260
masks.get(key)!
273261
);
274-
console.log(`calculateOverlayMigration resulted in ${overlayMutation ? overlayMutation?.type.toString() : "null"}`);
275262
if (overlayMutation !== null) {
276263
overlays.set(key, overlayMutation);
277264
}
@@ -298,7 +285,6 @@ export class LocalDocumentsView {
298285
transaction: PersistenceTransaction,
299286
documentKeys: DocumentKeySet
300287
): PersistencePromise<void> {
301-
console.log("in recalculateAndSaveOverlaysForDocumentKeys");
302288
return this.remoteDocumentCache
303289
.getEntries(transaction, documentKeys)
304290
.next(docs => this.recalculateAndSaveOverlays(transaction, docs));

0 commit comments

Comments
 (0)