When parse error occurred, the node was not set to loaded (node.isLoaded and node.exists continued to return false)
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 in book.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 returning this._isLoaded.get() && this._parseError.get() === undefined potentially being a better long-term; however, because of the nature of the bug, I feared that isLoaded may have unintentionally become synonymous with isValid.
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
.