Repository navigation
Conversation
Co-Authored-By: Erik Rozi <erik.rozi@cognition.ai>
|
I'll fix CI failures and address comments from users with write access that start with 'Devin'.
Original prompt from Erik
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Co-Authored-By: Erik Rozi <erik.rozi@cognition.ai>
|
Browser verification passed on disposable MySQL 8.0.40 after applying the non-unique username index. Verified real login, owner-isolated history, sender/recipient transfer balances and entries, rejected transfers, logout and anonymous redirects using synthetic accounts. Reused the scenarios/selectors from PR #361 without modifying it; this was manual browser verification, not a Cypress suite run.
Evidence covers 3bb81f1. The only subsequent change is d34fe9f, correcting the setup-java CI pin; application, migration and test code are identical. The initial CI job could not resolve my incorrect action pin; the replacement is verified against upstream v4.7.1, and the real-MySQL correctness job passed, including archived reports and plans. All six checks are green; Devin Review found no issues on the final commit. Observed cosmetic issue (Sev 3): the logged-out login logo is broken; it loads after authentication. It does not block any tested flow, and application/security/template files are unchanged by this PR. No browser latency, concurrent load, or null-transaction rendering claim is made. |
Summary
AccountRepository.findByUsernamescanned all accounts during login, dashboard/history and transfer recipient lookup. Add one non-uniqueaccount(username)index as an explicit versioned SQL migration, preserving duplicate usernames, nulls and collation. No Java application, query, security, ordering or response-size changes. The existing transaction foreign-key index was verified in real MySQL and left alone.Applying the SQL is required: application startup does not automatically run these migration files. This PR does not deploy or connect to an existing database.
Measurement
MySQL 8.0.40, 100,000 synthetic accounts, 1,000,006 transactions, 80,000 active accounts; one history contains 50,000 rows. Deterministic skew, fixed dates, decimal and null/duplicate boundary fixtures. Same disposable server, dataset and connection in before/after/rollback phases; 5 warm-ups + 21 samples per query per phase.
Host: Linux x86-64 / Intel Xeon / 8 visible CPUs / approximately 31 GiB RAM / no swap. Database constrained to 2 CPUs, 2 GiB RAM, 256 MiB buffer pool. Java 17.0.19. Image ID:
sha256:d58ac93387f644e4e040c636b8f50494e78e5afc27ca0a87348b2f577da2b7ff.user-0050000absent-userduplicate1DB timing is the instrumented root iterator last-row time from
EXPLAIN ANALYZE; JDBC includes preparation, transport and all-column/all-row consumption, not HTTP. Username lookup improved; no meaningful transaction-history SQL improvement was demonstrated, so no transaction index/rewrite was added.Separately, in-process MockMvc response medians:
/dashboard35.620 → 2.432 ms;/transactions37.652 → 3.655 ms for an ordinary account. These include controller/repository/template work but exclude TCP, browser rendering and password hashing. They are not end-user login latency or an application-wide speedup claim.Generated SQL and plans
Baseline
SHOW INDEX: accountPRIMARY(id)only; transactionPRIMARY(id)and InnoDB-createdFK6g20fcr3bhr6bihgy24rq1r1b(account_id). After: the sole additional index isidx_account_username(username),Non_unique=1.The harness archives full plans, SQL, parameters, exact counts, schema/index definitions, storage sizes, machine metadata, raw samples and median summaries. The plans above are captured examples before warm-up, not the median timing samples in the table.
Equivalence and validation
DECIMAL(38,2), leap-day microseconds and 1970/2038 boundaries.accountIdcannot replace the authenticated username. Valid history HTML matches before/after.Exact reproduction and rollback
Local commands used
JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64and appended-s /home/ubuntu/maven-settings.xmlbecause Maven Central returned HTTP 429; that VM-only, credential-free file mirrorscentraltohttps://maven-central.storage-download.googleapis.com/maven2. It is unnecessary on normal runners. No repository mirror/security changes were made.Preserve
target/mysql-performance/**,target/surefire-reports/**, andtarget/failsafe-reports/**. See methodology, Jenkins archive example, commands and limitations.For a separately owned disposable database, inspect
SHOW INDEXfirst and do not add an equivalent existing leading-column index. Applysql/performance/V001__account_username_index.sqlonce; rollback withsql/performance/U001__account_username_index.sqlusing a MySQL client with an interactive password prompt. The harness executes both files and compares results automatically. There is no migration-history framework or automatic application on startup.Index allocation grew by 3,686,400 bytes (3.52 MiB) on this dataset. Inserts/deletes/username updates maintain another B-tree and consume buffer/redo/I/O; balance-only changes do not alter the username key.
ALGORITHM=INPLACE, LOCK=NONEstill requires metadata locks and temporary build resources. No write-throughput claim is made. Rollback drops only this index, requires no data or Java rollback, and restores the original scan.Untested / limits: production data or access; concurrent load/writes or migration contention; cold caches; other server versions; end-user/network latency; null-valued transaction rendering in the browser; write-throughput overhead. Measurements concern this application and synthetic MySQL dataset—not Oracle 19c or a 10-TB deployment. Existing transactionality/security/unbounded-history behavior is unchanged. No changes to PR #361.
Prompt
Link to Devin session: https://devin-gtm.devinenterprise.com/sessions/7bb6035bc84d4507b2143c037a290ad4
Open in Devin Desktop: https://devin-gtm.devinenterprise.com/desktop/session/7bb6035bc84d4507b2143c037a290ad4?variant=devin
Requested by: @erikrozi
Devin Review