Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
part of openstax/ce#1796
Background:
When parse error occurred, the node was not set to loaded (
node.isLoaded
andnode.exists
continued to returnfalse
)Since these nodes were never considered loaded, they were re-enqueued for loading forever.
The immediate trigger for the problem was the
BookValidationKind.MISSING_PAGE
validation inbook.ts
requiring pages to be loaded to check if they exist.The underlying issue is a much deeper problem related to the job queue. If too many jobs are enqueued in a short time, poet halts without error. When this occurs, poet must be reloaded.
Limiting re-enqueued
nodesToLoad
to those that do not have a parse error fixes the immediate issue.I thought about
isLoaded
returningthis._isLoaded.get() && this._parseError.get() === undefined
potentially being a better long-term; however, because of the nature of the bug, I feared thatisLoaded
may have unintentionally become synonymous withisValid
.