Repository navigation
First variant of depends tracking - works only for procedures - #9125
Open
AlexPeshkoff wants to merge 63 commits into
Open
AlexPeshkoff wants to merge 63 commits into
AlexPeshkoff wants to merge 63 commits into
Conversation
… use of it in dependent objects
…format` for `blr_int128` (#9124) Co-authored-by: Artyom Ivanov <artyom.ivanov@red-soft.ru>
…he specified plan' when the query contains a LEFT OUTER JOIN
Co-authored-by: asfernandes <asfernandes@users.noreply.github.com>
…an aggregated derived table
…f our internal allocator (#9152) Co-authored-by: Artyom Ivanov <artyom.ivanov@red-soft.ru>
…k dbb_sync before tarcing successful attach
…res in numeric literals (SQL:2023 T662) (#8564) * Adding SQL-compliant names to existing MAXVALUE/MINVALUE functions * Correcting the description. Adding words to keyword_or_column * Improved description * Add support non-decimal integer literals and underscores in numeric literals * Fix numeric literals lexer after merge with master - Restore introducer handling lost in the merge: the lexer returns INTRODUCER only and the charset name is parsed by the grammar (schema_opt_qualified_name). Keep the T662 check for an underscore before a digit or a period. - Restore constexpr/noexcept in chars.h and const in Parser.cpp lost in the merge. - Return LIMIT64_INT/LIMIT64_NUMBER for exactly MAX_SINT64 + 1 (decimal and non-decimal), so START WITH and SET GENERATOR accept -9223372036854775808 and -0x8000000000000000 again. - Keep data types of decimal literals unchanged: remove the DBL_DIG rule (16+ fractional digits produced DECFLOAT), use DECFLOAT for an approximate literal with a mantissa wider than 64 bits or |exponent| > DBL_MAX_10_EXP, and for scale < MIN_SCHAR. - Follow the README grammar: accept "1." and reject "1e", "1e+" and "1e-". - README: fix examples and the <mantissa> rule, describe data types of non-decimal literals and the incompatibility with old hexadecimal literals.
…ed when a comparison references a field with the same field id from another table
Reuse the format already held by rpb_record when fmt_version matches rpb_format_number instead of resolving it via RelationPermanent::getFormat() for every record.
get_pointer_page() checked the pointer page count on every call, so the record path acquired and released a SharedReadVector hazard pointer (and pinned a generation) just to decide whether a rescan was needed. The same applied to hasData() and getPointerPageCount(). Keep a mirror count updated by the single writer under m_mutex after the vector mutation. Callers that also need page numbers now hold one accessor for the whole operation and resolve values through the new getPointerPage(accessor, sequence) overload, so a single hazard pointer covers both the bound check and the lookup. Add assertions to validate the new logic. Some minor refactoring to cover repeating usage patterns.
getIndexSlot() redirected an irt_migrate slot to its back slot for every transaction other than the migration owner, even after it had committed. As a result the new index was never exposed, migration finalization never ran, and BTR_all() omitted the index entirely. Stop redirecting once the migration is committed and allow setNormal() from irt_migrate.
GroupedCountsArray::operator[] inlined both the SortedArray lookup and the insertion branch into every RuntimeStatistics::bumpValue() call. As bumpValue() runs three times per page fetch, the inlined slow path gave that function a 104-byte frame and a stack-protector check on each call, even though the m_lastPos fast path almost always hit. Move the search and insertion into an out-of-line findOrAdd() and keep only the m_lastPos check inline. The fast path becomes leaf-like, and bumpValue() is then small enough to be inlined into bumpStats(), which is called once per fetch. The two template instantiations are emitted explicitly in RuntimeStatistics.cpp, as the slow path is used from other translation units. Measured on 500k rows (callgrind, single scan pass): 49M fewer instructions (2.9%) and ~5% lower wall time, with the page statistics path dropping from 134 to 69 instructions per fetch.
fastRemove() (and the accessor advance after it) may regenerate tree keys, and for BePlusTree<SecurityClass*> / BePlusTree<Segment*> the key generator dereferences the pointed object. Deleting the object before removing it therefore reads freed memory once the tree spans more than one leaf page.
…rashes inside verifyTriggerAccess()
record_param::getWindow(tdbb) resolved the relation pages on every call only to assign the window's page space, even when the window already held a page fetched from that same relation. Called once per record from DPM_next and VIO_data, and from every CCH_RELEASE, it made getBasePages() one of the top costs of a sequential scan. Skip the lookup when the window already holds a page (its page space is thus initialized), and add a getWindow(pageSpaceId) overload for callers that already have the RelationPages resolved.
…t reuse the already allocated pages
Fixed bug #9302 : Rollback of a limbo transaction commits it: gfix -rollback on EOF/empty answer
Fixed bug gh-9301 : SNAPSHOT transaction may miss rows or see later commits if another transaction commits while it is starting
…SELECT after concurrent DROP TABLE commits; fixed a memory leak regression
…tead of linear search (#9290)
…al indexes Problem introduced by commit 050a726.
…esn't work with ESoE
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.
I present for early review solution that should solve some "regressions" with new metadata cache. Word regressions is quoted cause pre-fb6 some specific changes in database (like changed number of output procedure parameters) under some circumstances kept dependent objects working correctly without recompile of that dependent objects. That was pure lucky cases among other failing - but people used that and do not get format outdated error instead.
The overall idea is simple - if one needs to do some breaking changes in a set of objects (currently only procedures but others will work in same manner) this can be done in single transaction and everything needed will be recompiled on commit. Certainly that commit fails if compilation fails - but one can fix errors and repeat commit.
This PR is not ready for merge yet (all objects to be taken into an account) - but one who interested can play with procedures right now.