-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not save empty advertisements to mirror (#2471)
Empty advertisements should not be saved to mirror since they do not help index ingestion. Advertisements may have no multihash entries when: 1. The ad removes a context ID - When ingesting ads, the indexer does not read removal ads from the mirror since there is no entry data to get. 2. The ad only updates metadata or provider information - The indexer stores the metadata, but does not read mirror since there are no entries 3. The ad was deleted by a removal ad later in the chain - Once an ad is known to be deleted, that ad will never be read from the mirror since its content is deleted 4. The publisher is not serving entries data - This is treated like a no-content ad, as in case 2, but means that at some point in the past the ad had entry data. The is or should be a pending unpublished removal later in the chain. So, do not save this in a mirror since it will end up being deleted later, or may be a temporary publisher that should be queried by another indexer using the mirror. In either case the advertisement should not be written to the mirror. GC also removes any empty (no-content) advertisements from the mirror, and reindexing must not repopulate them. Other changes: - GC always logs number of indexes removed - Always HAMT entries which are not mirrored
- Loading branch information
Showing
3 changed files
with
86 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters