-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
All changes for LoyaltyLion #1
base: master
Are you sure you want to change the base?
Commits on Nov 20, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 6b9f118 - Browse repository at this point
Copy the full SHA 6b9f118View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0d9b091 - Browse repository at this point
Copy the full SHA 0d9b091View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6bd2aea - Browse repository at this point
Copy the full SHA 6bd2aeaView commit details -
Configuration menu - View commit details
-
Copy full SHA for b59090f - Browse repository at this point
Copy the full SHA b59090fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 935d919 - Browse repository at this point
Copy the full SHA 935d919View commit details -
Configuration menu - View commit details
-
Copy full SHA for 27a0425 - Browse repository at this point
Copy the full SHA 27a0425View commit details -
add TransactionalEntityManager type
This type is used instead of a regular EntityManager in the EntityManager.prototype.transaction callback. It extends an EntityManager, so can be used as normal, but is not assignable to one, so functions and services can require this type in order to assert they receive a manager that has already started a transaction
Configuration menu - View commit details
-
Copy full SHA for c42b2c0 - Browse repository at this point
Copy the full SHA c42b2c0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 27c2c06 - Browse repository at this point
Copy the full SHA 27c2c06View commit details -
Configuration menu - View commit details
-
Copy full SHA for d076c24 - Browse repository at this point
Copy the full SHA d076c24View commit details -
set and unset activeTransaction flag on databaseConnection
LL specific change - our legacy services use this field to determine if a transaction is active or not, if we don't manage it via typeorm then it's possible legacy clients will still think they are in a transaction when they're not
Configuration menu - View commit details
-
Copy full SHA for df1c230 - Browse repository at this point
Copy the full SHA df1c230View commit details -
Configuration menu - View commit details
-
Copy full SHA for 10decce - Browse repository at this point
Copy the full SHA 10decceView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2dd6468 - Browse repository at this point
Copy the full SHA 2dd6468View commit details -
remove bad connections from the postgres pool after a failed query
typeorm currently lets pg.pool assume that clients are always safe to add back into the pool, even if it encountered an error while running a query. this is /usually/ fine, because the vast majority of errors that happen during a query do not cause the client's connection itself to become inoperable however, if, during a query, the client's connection is killed, the query will fail and the client will be placed back into the pool even though it's linked to a now broken connection, i.e. that client will never work again, but because pg.Pool doesn't know that, it'll keep handing it out. end result: lots of failed queries this patches `Connection.prototype.query` so that it passes the error back to the driver when it calls `queryRunner.release`. the driver can (if applicable) then inspect the error and decide if it should result in the client being removed from the pool or just released as normal
Configuration menu - View commit details
-
Copy full SHA for 7fe3ea8 - Browse repository at this point
Copy the full SHA 7fe3ea8View commit details -
Configuration menu - View commit details
-
Copy full SHA for f82e66e - Browse repository at this point
Copy the full SHA f82e66eView commit details -
remove clients from the pool following any error
we're not confident in our ability to accurately determine what a "bad" error (i.e. one that has rendered the connection broken). to be safe, we'll instruct the pool to remove any client that failed to execute a query though this will result in more pool churn, we're using pgbouncer so those connections are cheap, and this provides maximum safety overall
Configuration menu - View commit details
-
Copy full SHA for 4e88776 - Browse repository at this point
Copy the full SHA 4e88776View commit details -
tom committed
Nov 20, 2020 Configuration menu - View commit details
-
Copy full SHA for a2fd785 - Browse repository at this point
Copy the full SHA a2fd785View commit details -
tom committed
Nov 20, 2020 Configuration menu - View commit details
-
Copy full SHA for fb16ecd - Browse repository at this point
Copy the full SHA fb16ecdView commit details
Commits on Nov 14, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 330a751 - Browse repository at this point
Copy the full SHA 330a751View commit details -
test: add benchmark for select querybuilder (typeorm#8955)
Motivation: the query builder (and within it, replacePropertyNames and associated functions) is pretty CPU intensive. For our workload, it's one of the hottest functions in our entire stack. While improved in typeorm#4760, There are still outstanding issues relating to perf e.g. typeorm#3857 As we all know though, the first step in optimization is to measure systematically ;) https://wiki.c2.com/?ProfileBeforeOptimizing On my machine, this benchmark runs in ~3500ms or about 0.35ms/query. This tells us there's a way to go - on my stack, that's about 1/3 of a typical query's latency!
Configuration menu - View commit details
-
Copy full SHA for bda2c2c - Browse repository at this point
Copy the full SHA bda2c2cView commit details -
perf: don't recompile escapeRegExp for every query (typeorm#8956)
Context: the query builder is pretty CPU intensive, and can be slow - e.g. typeorm#3857 One of the things which makes this slow is `escapeRegExp` in the query builder: we freshly construct the same RegExp once per `replacePropertyName` invocation (many times per overall query!) and since the RegExp itself is constant -- we can lift it out and construct it once. Over-all this saves about 8% on our query build times as measured by typeorm#8955.
Configuration menu - View commit details
-
Copy full SHA for 1631cfb - Browse repository at this point
Copy the full SHA 1631cfbView commit details -
perf: partially lift matching from regexp to js (typeorm#9032)
Digging further into typeorm#3857. See also typeorm#8955, typeorm#8956. As [previously discussed](typeorm#3857 (comment)), the query builder currently suffers from poor performance in two ways: quadratic numbers of operations with respect to total table/column counts, and poor constant factor performance (regexps can be expensive to build/run!) The constant-factor performance is the more tractable problem: no longer quadratically looping would be a chunky rewrite of the query builder, but we can locally refactor to be a bunch cheaper in terms of regexp operations. This change cuts the benchmark time here in ~half (yay!). We achieve this by simplifying the overall replacement regexp (we don't need our column names in there, since we already have a plain object where they're the keys to match against) so compilation of that is much cheaper, plus skipping the need to `escapeRegExp` every column as a result.
Configuration menu - View commit details
-
Copy full SHA for 925fa85 - Browse repository at this point
Copy the full SHA 925fa85View commit details -
Configuration menu - View commit details
-
Copy full SHA for 405f688 - Browse repository at this point
Copy the full SHA 405f688View commit details -
Configuration menu - View commit details
-
Copy full SHA for afb5e11 - Browse repository at this point
Copy the full SHA afb5e11View commit details