Repository navigation
fix(teched): bound public /build/teched feed (#2312) - #2336
Merged
Merged
Conversation
The public /build/teched handler did unbounded full-table SELECTs plus
separate full-table NCLOB passes for abstract/bio/description on a route
cached only 60s. Harden it:
- LIMIT the sessions query to 1000 (well above the ~300/venue real size,
so nothing is dropped) with a stable orderBy; add optional
?venue=BERLIN|VIRTUAL and ?upcoming=true scoping.
- Fetch the abstract LOB only for emitted (bounded) session rows via
WHERE ID IN (...), batched under the HANA bound-parameter cap, via a
new fetchLobColumnByIds helper (keeps the LOB-locator-safe pattern).
- Scope the session/speaker junction read to the emitted sessions.
- Keep tracks/speakers fully fetched (tiny dimension tables) so every
emitted session resolves its track_ID and speaker links — no
unordered cap that could silently drop a referenced row.
Response shape unchanged: {sessions,speakers,tracks,buildAt} incl. venue
per session and the relatedDevtoberfestSessions cross-link; public
projection (no source/audit fields); Cache-Control public, max-age=60.
Adds test/unit/srv/build-teched-endpoint.test.js.
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.
What
Hardens the public
GET /build/techedfeed (added by the TechEd foundation, #2312). It previously did unbounded full-table SELECTs plus separate full-table NCLOB passes forabstract/bio/descriptionon a route cached only 60s. Catalog is ~346 sessions so impact is modest — this is defensive bounding.Changes
LIMIT 1000(well above the ~300/venue real size, so nothing is dropped) and a stableorderBy.?venue=BERLIN|VIRTUALand?upcoming=true(drops already-ended sessions).abstractis fetched viaWHERE ID IN (...)scoped to the bounded session rows, batched under the HANA bound-parameter cap, through a newfetchLobColumnByIdshelper. Keeps the LOB-locator-safe pattern (LOB in its own query, never alongside metadata).track:nullor a missing speaker. Referential integrity preserved.Not changed (shape preserved)
{sessions,speakers,tracks,buildAt}incl.venueper session and therelatedDevtoberfestSessionsDevtoberfest cross-link; public projection (drops sourceId/contentHash/audit);Cache-Control: public, max-age=60.Tests
Adds
test/unit/srv/build-teched-endpoint.test.js(7 tests): shape + 60s cache, LOBs/venue/cross-link present, no leaked source/audit fields, bounded,?venueand?upcomingfilters, and a referential-integrity guard (every emitted session resolves its track + all speakers). All pass against the in-memorycds.test('serve')harness (real HTTP).