aboutsummaryrefslogtreecommitdiff
path: root/internal/postgres/insert_module.go
AgeCommit message (Collapse)Author
2020-04-23all: rename module to golang.org/x/pkgsiteJulie Qiu
golang.org/x/discovery is renamed to golang.org/x/pkgsite. When the repository is open sourced, it will be hosted at go.googlesource.com/pkgsite. Change-Id: Ifc3b45b771a385b99179e785447f2a87afcacf87 Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/724273 Reviewed-by: Jonathan Amsterdam <jba@google.com>
2020-04-17internal/postgres: sort values for documentation, readme, and package_importsJulie Qiu
Sort values inside postgres.insertDirectories properly before inserting to prevent deadlocks. Fixes b/154304606 Change-Id: Ide364d01fa585c702a078d85120f0c4088c54f7c Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/720887 CI-Result: Cloud Build <devtools-proctor-result-processor@system.gserviceaccount.com> Reviewed-by: Jonathan Amsterdam <jba@google.com>
2020-04-17internal/postgres: use BulkInsertReturning instead of getPathIDsJulie Qiu
Fixes b/154309056 Change-Id: I8308d813c8de6c053812425743d5c1f2b100d288 Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/720885 Reviewed-by: Jonathan Amsterdam <jba@google.com>
2020-04-17internal/postgres: fix invalid byte seq for readme contentsJulie Qiu
An error occurred when inserting into readmes: invalid byte sequence for encoding "UTF8" This is now fixed. Change-Id: I51f7d0c22f833b052daabc405495518c4c5e47a4 Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/720665 CI-Result: Cloud Build <devtools-proctor-result-processor@system.gserviceaccount.com> Reviewed-by: Jonathan Amsterdam <jba@google.com>
2020-04-17internal/postgres: fix deadlock on package_importsJulie Qiu
There are 500 errors when inserting into package_imports due to deadlines. We had this problem in the past with imports, and sorting by path previously solved the issue. Change-Id: Ia49408d4aa448852434b4dfa2fa6b1261fbfdaee Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/720664 Reviewed-by: Jonathan Amsterdam <jba@google.com>
2020-04-16internal/fetch: rename FetchVersion to FetchModuleJulie Qiu
Change-Id: Ic1ff97a19199940f8d6b28c3f23d368fff2dbbbc Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/717235 Reviewed-by: Jonathan Amsterdam <jba@google.com>
2020-04-16internal/database: log transaction start and endJonathan Amsterdam
This requires adding a context parameter to the Transact method. Change-Id: I98e8b9cbd8ce724cbed693d7549e82cf8ee75990 Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/719480 Reviewed-by: Julie Qiu <julieqiu@google.com>
2020-04-15internal/postgres: insert into paths, readmes, documentation, package_importsJulie Qiu
InsertVersion now populates the following tables: - paths - readmes - documentation - package_imports Change-Id: Ib02220101d148a261cf55bd564cb9f9a46e60544 Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/704882 Reviewed-by: Jonathan Amsterdam <jba@google.com>