Merge pull request #4551 from matrix-org/jryans/event-logging-rm-rc
EventIndex: Reduce the logging the event index is producing.pull/21833/head
						commit
						7b131d873d
					
				|  | @ -102,9 +102,6 @@ export default class EventIndex extends EventEmitter { | |||
|             const timeline = room.getLiveTimeline(); | ||||
|             const token = timeline.getPaginationToken("b"); | ||||
| 
 | ||||
|             console.log("EventIndex: Got token for indexer", | ||||
|                         room.roomId, token); | ||||
| 
 | ||||
|             const backCheckpoint = { | ||||
|                 roomId: room.roomId, | ||||
|                 token: token, | ||||
|  | @ -161,7 +158,6 @@ export default class EventIndex extends EventEmitter { | |||
|         if (prevState === "SYNCING" && state === "SYNCING") { | ||||
|             // A sync was done, presumably we queued up some live events,
 | ||||
|             // commit them now.
 | ||||
|             console.log("EventIndex: Committing events"); | ||||
|             await indexManager.commitLiveEvents(); | ||||
|             return; | ||||
|         } | ||||
|  | @ -336,8 +332,6 @@ export default class EventIndex extends EventEmitter { | |||
|     async crawlerFunc() { | ||||
|         let cancelled = false; | ||||
| 
 | ||||
|         console.log("EventIndex: Started crawler function"); | ||||
| 
 | ||||
|         const client = MatrixClientPeg.get(); | ||||
|         const indexManager = PlatformPeg.get().getEventIndexingManager(); | ||||
| 
 | ||||
|  | @ -366,8 +360,6 @@ export default class EventIndex extends EventEmitter { | |||
| 
 | ||||
|             await sleep(sleepTime); | ||||
| 
 | ||||
|             console.log("EventIndex: Running the crawler loop."); | ||||
| 
 | ||||
|             if (cancelled) { | ||||
|                 break; | ||||
|             } | ||||
|  | @ -386,8 +378,6 @@ export default class EventIndex extends EventEmitter { | |||
| 
 | ||||
|             idle = false; | ||||
| 
 | ||||
|             console.log("EventIndex: crawling using checkpoint", checkpoint); | ||||
| 
 | ||||
|             // We have a checkpoint, let us fetch some messages, again, very
 | ||||
|             // conservatively to not bother our homeserver too much.
 | ||||
|             const eventMapper = client.getEventMapper({preventReEmit: true}); | ||||
|  | @ -477,9 +467,6 @@ export default class EventIndex extends EventEmitter { | |||
|             // decryption keys, do we want to retry this checkpoint at a later
 | ||||
|             // stage?
 | ||||
|             const filteredEvents = matrixEvents.filter(this.isValidEvent); | ||||
|             const undecryptableEvents = matrixEvents.filter((ev) => { | ||||
|                 return ev.isDecryptionFailure(); | ||||
|             }); | ||||
| 
 | ||||
|             // Collect the redaction events so we can delete the redacted events
 | ||||
|             // from the index.
 | ||||
|  | @ -511,15 +498,6 @@ export default class EventIndex extends EventEmitter { | |||
|                 direction: checkpoint.direction, | ||||
|             }; | ||||
| 
 | ||||
|             console.log( | ||||
|                 "EventIndex: Crawled room", | ||||
|                 client.getRoom(checkpoint.roomId).name, | ||||
|                 "and fetched total", matrixEvents.length, "events of which", | ||||
|                 events.length, "are being added,", redactionEvents.length, | ||||
|                 "are redacted,", matrixEvents.length - events.length, | ||||
|                 "are being skipped, undecryptable", undecryptableEvents.length, | ||||
|             ); | ||||
| 
 | ||||
|             try { | ||||
|                 for (let i = 0; i < redactionEvents.length; i++) { | ||||
|                     const ev = redactionEvents[i]; | ||||
|  | @ -552,8 +530,6 @@ export default class EventIndex extends EventEmitter { | |||
|         } | ||||
| 
 | ||||
|         this._crawler = null; | ||||
| 
 | ||||
|         console.log("EventIndex: Stopping crawler function"); | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 J. Ryan Stinnett
						J. Ryan Stinnett