| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Change-Id: I9a74c316b87ae35597ce846a830a55542d9aa14c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
And clean up after version requirement was increased to PG 10.
* In DatabasePostgres::indexInfo() iterate over all core schemas instead
of just querying the current schema. I broke this after the test for
it was disabled.
* In ApiQueryAllPages, remove the PG 9 branches and simplify the
comments.
* In DatabasePostgresTest, fix the skip conditions for the introduction
of DBConnRef.
* Remove tests for "old insert ignore", and "old insert select", which
no longer exist.
* In testFieldAndIndexInfo(), create a prefixed table name since that's
easier and safer than trying to switch domains just for this test.
Bug: T259084
Change-Id: Ifab7c045c40d039e542e2df19037b342d4984472
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Why:
- When a transaction lifecycle callback such as
onTransactionPreCommitOrIdle() is invoked by rdbms, rdbms passes in
the DB connection handle the callback was scheduled on.
- However, the DB connection handle may have since been reset to a
different DB domain on the same physical cluster due to connection
reuse.
- We could implement bookkeeping to keep track of the expected DB domain
for each pending callback and ensure the passed-in DB handle matches
that before invoking the callback, but nobody seems to be making use
of the passed-in DB handle except for two call sites in core.
- As such, it seems more prudent to remove this functionality.
What:
- Stop passing the DB connection handle to rdbms transaction lifecycle
callbacks.
Bug: T386190
Change-Id: I9125bfb8b5e2cac4aab3525ffd229ea49beccc17
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Use modern php syntax to call a callable.
Reduce the stack trace to improve performance
and better IDE and static analyzer support
Change-Id: I8e563140ac3465ce3b3f8ec5e01bfd493c7269fe
|
| |
| |
| |
| | |
Change-Id: I8478a7b5f6a53ddb648ead6eabb7015c1f2a33c8
|
|/
|
|
| |
Change-Id: I0f8a8cac36015bba52aea3ee2affd92f83d3574a
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Same as Ia294bf4 did for 1-line comments. This patch removes slightly
more complex 2-line PHPDoc comments that don't add any new information
to the code, but literally repeat what the code already says.
They say "don't document the code, code the documentation", and we
are doing this more and more. We just tend to forget to remove the
obsolete comments.
Note I'm also removing a line of text in a few cases when it's very
short and literally says the same as the method name. Again, such
comments add zero new information.
Change-Id: I01535404bab458c6c47e48e5456403b7a64198ed
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I assume these are all either auto-generated by an IDE or the
language-level type declarations have been added later. In any case
the comments don't add any new information to what the code already
says. This is just extra clutter that makes the code harder to read,
I would argue.
There are many, many more comments like this. In this patch I
intentionally focus on the most trivial 1-line comments.
Change-Id: Ia294bf4ce0d8a77036842fe25884bc175c2b0e7d
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Merged the (apply|undo)TransactionRoundFlags() methods into a single
syncConnectionRoundState() method. Avoid the use of REMEMBER_PRIOR,
which carried some risk of the flags and round state getting out of
sync during failure/recovery.
Add LB_TRX_ROUND_LEVEL for tracking transaction rounds, even when
they are implicit.
Change-Id: I77ffcf4814adee4e1d9bb0897cd22427465e33ed
|
| |
| |
| |
| |
| | |
Bug: T340552
Change-Id: I4e480e01ada308f15304630d8caa6921418cd4c6
|
| |
| |
| |
| |
| | |
Bug: T340552
Change-Id: Ie44ebc11d62ba71542ea8f7055be65df06468227
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Why:
Sometimes the verb will be something really generic like BEGIN.
https://phabricator.wikimedia.org/F58134893
Bug: T340552
Change-Id: I60dcc1cda332d4d64fb66b084bb7da582e7d1a3f
|
| |
| |
| |
| | |
Change-Id: I484ce9391511a395ffeed4e4084d34f4c12cb8bd
|
| |
| |
| |
| |
| | |
Bug: T340552
Change-Id: I7896f6ebee151d7da1d88e04bb4d05dc007d67e8
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Make the Maintenance transaction wrapper methods directly invoke
DeferredUpdates::tryOpportunisticExecute() and flush stats data.
This includes the following methods:
* Maintenance::commitTransaction()
* Maintenance::commitTransactionRound()
* Maintenance::waitForReplication()
Add explicit DeferredUpdates::tryOpportunisticExecute() calls to
integration tests as needed.
Deprecate the now-unused IDatabase::setTransactionListener() and
ILBFactory::setWaitForReplicationListener().
Bug: T373057
Change-Id: I06488d1826ee97de460cf52117b5d691fa5945ad
|
|/
|
|
|
|
|
|
|
| |
isset() should only be used to suppress errors, not for null check.
When the property is always defined, there is no need to use isset.
Found by a new phan plugin (2efea9f989)
https://www.mediawiki.org/wiki/Manual:Coding_conventions/PHP#isset
Change-Id: Ib84b7d71e8308a36409f30ecfd16e9de149e97b3
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
I recently learned about this way to disable PHPCS checks
within a block comment, we use it in some other places.
Change-Id: Ibac8be95cd6a479481b20c7a2653800d6252dfb7
|
| |
| |
| |
| |
| |
| |
| |
| | |
Use strict comparisons with getTransactionRoundFname() return values.
Update some LB_* constant comments.
Change-Id: I5401af02e2b302be0f73864f9d53f6b4d29b65b1
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
These are not IDs and the name was inconsistent with actual ID fields
in things like TransactionManager.
Rename IDatabase::LB_TRX_ROUND_ID constant to LB_TRX_ROUND_FNAME
and Database::getTransactionRoundID() to getTransactionRoundFname().
Also, make the trxRoundFname field string|null instead of the less
standard string|false style. This now matches TransactionManager and
Database::getTransactionRoundFname() and allows for simplification
of the later.
Also mark the IDatabase::LB_* constants internal.
Change-Id: I8f98624b4aea3402093f65e12d89dc14a01eab3c
|
| |
| |
| |
| |
| |
| |
| | |
Deprecated in Iaee516dc25c50f8c4.
Bug: T373655
Change-Id: I025c0983bc85617682214a57fe41cb363713cbab
|
|/
|
|
|
|
|
|
|
|
| |
These cancel callbacks are not used at all.
It is adding a lot of complexity to the transaction management of
rdbms making it quite harder to understand and reason about.
Bug: T363839
Change-Id: I3cb1e30611b83c03535ea87a216bbedd4a911f4e
|
|\ |
|
| |
| |
| |
| | |
Change-Id: I27b9a19ab952ede1267921bd042af0fe1c89e228
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Always create a GeneralizedSQL instance for the profiling callback
and TransactionProfiler. This cuts down on the duck type checking.
Fix bug where the "role-primary" prefix was missing if the clean
SQL was set for the Query instance.
This change adds a GeneralizedSql::newFromQuery() helper method.
Change-Id: Ib05f7693ac81ad88248ce69a22094aecb4bf7842
|
|\| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Only count writes that were committed (including auto-committed).
There are already methods like writesPending() for checking for
pending writes and the timestamp that pending writes where issued
is not useful. The write commit timestamp is what matters.
These methods are used by waitForReplication(), which should not
try to wait for pending changes to replicate, since they have to
be committed first.
Mark these methods as @internal and use null return values
instead of false.
Change-Id: If1a9a21637d6e5ba3643c77cbc8bc6459f8aa882
|
|\ \ \
| |_|/
|/| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Follows-up I39cee1363496dfe2, which added a condition based on
`status > ERROR` which I think requires a reliance on, and
understanding/remembering of, the numerical sequence of statuses.
This sequence appears undocumented, both in the TransactionManager
constants and the trxStatus/sessionStatus methods, but either way is not
needed in any of the current cases. This made the code harder to
understand, increases doubt about its correctness, requiring additional
checking while debugging or code reviewing.
Change-Id: Ia0f4b0cfae02de52e7618e558cca6d266689e760
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Implicitly marking parameter $... as nullable is deprecated in php8.4,
the explicit nullable type must be used instead
Created with autofix from Ide15839e98a6229c22584d1c1c88c690982e1d7a
Break one long line in SpecialPage.php
Bug: T376276
Change-Id: I807257b2ba1ab2744ab74d9572c9c3d3ac2a968e
|
| |
| |
| |
| |
| |
| |
| | |
Add some unit tests for this method.
Bug: T366640
Change-Id: I466c83a8d2b8fabcd4c30eb079273dfd52a31b71
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In case a DB handle ends up in STATUS_TRX_ERROR, use "ROLLBACK" so
that assertQueryIsCurrentlyAllowed() does not complain.
Also improved related Database::assessConnectionLoss() comments.
Change-Id: I39cee1363496dfe29e268a219b39070b23fdee4c
|
|\ \ \ |
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Providing the function name is often optional from the php code,
but it is needed for better logging, so make it mandatory and let phan
report issues about this.
Bug: T374546
Depends-On: Iaed5489a85a5a6e685829e151436afc94310fbd0
Depends-On: Ie2a1e5052e5b61bbb5b89905de942f47d3f1413d
Change-Id: I5227f2fa65850ac8c6f620900f22d1f4e7bfd470
|
|\ \ \
| |_|/
|/| | |
|
| |/
| |
| |
| |
| |
| |
| | |
No need to provide a default function name for function called from
within rdbms library, it should be easy to provide always the argument
Change-Id: Id9ad3a93e9d5d1c90dd9dfcb442d761c67ba951b
|
|/
|
|
|
|
|
|
|
|
|
| |
I hit an upgrade failure due to an index which didn't exist in the
schema being upgraded, although it did exist in another schema in the
same database. The pg_indexes system view gives information about all
indexes in the database.
So, have indexInfo() return information only about the core schema.
Change-Id: Idfe3bfac981e29b772860a429786f3fa3e53bbc3
|
|
|
|
| |
Change-Id: Ie2a1e5052e5b61bbb5b89905de942f47d3f1413d
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Update the class/interface description comments.
Mark FLUSHING_ALL_PEERS/FLUSHING_INTERNAL as internal.
Bug: T373655
Change-Id: Id6048bdb1b4d0ff92ae307f154b35154a03733ec
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Better emphasize that there should only be one string that callers use
to reference a given table. This is what ChangedTablesTracker relies on
for write queries. For read queries, databases can be vertically sharded
on different servers or remapped using virtual domains, so the use of
"db.table" notation should be discouraged there as well.
Mention that "information_schema." is allowed as well as unqualified
table names.
Change-Id: I0b6295d0dd58aafd09a5c99aaf0ae9a81641d55a
|
|\ \ |
|
| |/
| |
| |
| | |
Change-Id: I293584056d5b4903b5fc67632a93171997d6dc0d
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Avoid that new code contains this pattern.
Depends-On: I7a9b5c89129fe4b555d03861f2c3ce3e9e2b2446
Depends-On: Ic2bcc7eeb16d3333dcd019bd209bd7fde843dab9
Depends-On: If20eddd8376ae2e8e29c4e56cd51f7b8eb6642b0
Depends-On: I3414f7e17f4bcb801857bc986bae8eb97aa2bfb8
Depends-On: I38b2729418e8389c681c6cd84858f5e5ed25bd3e
Change-Id: I7cfd2e027edd327cf8be6471e348c137fefacda0
|
|\ \ |
|