Repository navigation
Land no line a reader may refuse, and index any label and any number of parts - #68
Merged
Merged
Conversation
…of parts A review of every reader against what asz writes found two ways our own data could be refused. - No landed line nests deeper than 256 objects and lists. A reader may refuse a deeper line, and the OAP does, dropping every later record of the file; asz landed data up to Go's own limit of about 10,000 levels. A part whose data nests deeper than its 253 levels of the line is taken out as a payload too large to carry is, whatever its size: too_large, or truncated while its text is left, with its size and SHA-256 kept. A change or execution record is never taken out whole: it is written again in its own format, without the field its format does not name, and says truncated. A provider body's piece is taken out by its cutter the same way. The writer changes a record only when it then encodes, so a record that cannot be written stays as the caller gave it. - The index takes a label or an identifier of any length, and a record of any number of parts. A string of 64 KiB or more stopped the session's index from being written, so the session never parsed again, and the 65,537th part of a record took the first part's position. String lengths and part positions are 32-bit, and the index schema moves to 16. - LangSmith tests that made a request unlandable with 9,998-deep data now check it lands with the field taken out. The skeleton test of the page's files route checks what the route serves today.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
A review of every reader against what asz writes found two ways our own data could be refused.
What changes
too_large, ortruncatedwhile its text is left, and keeps its size and SHA-256.changes/1orexecution/1record is never taken out whole, since a step joins to it by its tool call. It is written again in its own format, without the field its format does not name, and saystruncated.The renderer side of the same review is apache/skywalking-horizon-ui#198. This PR does not need it. The pinned renderer moves in its own change once #198 merges.
Tests
pkg/sessiondata:truncated;pkg/providerbody: a tool nested too deep is taken out, and the body still rebuilds from its source.internal/index: a 70,000-byte label and a record of 65,538 parts read back.internal/adapters/langsmith: a request holding 9,998-deep data lands with the field taken out, where it was set aside whole before.internal/view: the skeleton test of the files route now tests what the route serves today.Each new guard was proven by reverting it.
make test, the JSON v1 step (GOEXPERIMENT=nojsonv2),make scenarios, lint and the Windows build pass.