Genesys Backend issueshttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues2021-06-29T13:39:09+02:00https://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/597Finding similar accessions2021-06-29T13:39:09+02:00Matija ObrezaFinding similar accessionsFinding "Similar accessions" of https://sandbox.genesys-pgr.org/a/4c669455-02b0-421b-a5be-80fa3111fa94 throws
```
java.lang.NullPointerException
at org.genesys2.server.service.worker.dupe.AccessionDuplicateFinder.getCandidates(Accessio...Finding "Similar accessions" of https://sandbox.genesys-pgr.org/a/4c669455-02b0-421b-a5be-80fa3111fa94 throws
```
java.lang.NullPointerException
at org.genesys2.server.service.worker.dupe.AccessionDuplicateFinder.getCandidates(AccessionDuplicateFinder.java:219)
at org.genesys2.server.service.worker.dupe.AccessionDuplicateFinder.getCandidates(AccessionDuplicateFinder.java:44)
at org.genesys2.server.service.worker.dupe.DuplicateFinder.findSimilar(DuplicateFinder.java:124)
```2021.2Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/594Overviews2021-05-21T13:58:01+02:00Matija ObrezaOverviewsThe Overviews load very very slowly in Production (www.genesys-pgr.org). And also Partner list and the Subsets lists.
We should (at least) enable caching of the results of that service method.The Overviews load very very slowly in Production (www.genesys-pgr.org). And also Partner list and the Subsets lists.
We should (at least) enable caching of the results of that service method.2021.2Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/593Downloading images2021-05-11T15:12:46+02:00Matija ObrezaDownloading images@jguerrero describes a use case for downloading in bulk the images of filtered accessions:
1. Filter accessions
2. Browse images
3. Click "Download" to receive a Zip archive of images of selected accessions
The number of images to down...@jguerrero describes a use case for downloading in bulk the images of filtered accessions:
1. Filter accessions
2. Browse images
3. Click "Download" to receive a Zip archive of images of selected accessions
The number of images to download and/or the total size of bytes to compress and stream to the user must be limited.
Since images are not stored on cluster nodes, they must be streamed to the resulting Zip file.2021.2Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/591Database connection pool2021-04-16T11:14:53+02:00Matija ObrezaDatabase connection poolCheck why this happens during ES reindexing:
```
19:05:32.766 [genesys-background-27] ERROR org.hibernate.engine.jdbc.spi.SqlExceptionHelper - (conn=203) Communications link failure with secondary host mariadb2:3306. Connection reset by...Check why this happens during ES reindexing:
```
19:05:32.766 [genesys-background-27] ERROR org.hibernate.engine.jdbc.spi.SqlExceptionHelper - (conn=203) Communications link failure with secondary host mariadb2:3306. Connection reset by peer (Write failed)
19:05:32,767 genesys-background-27 ERROR o.g.s.s.i.ElasticsearchServiceImpl:602 - org.hibernate.exception.JDBCConnectionException: could not extract ResultSet
javax.persistence.PersistenceException: org.hibernate.exception.JDBCConnectionException: could not extract ResultSet
at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:154)
...
at org.genesys2.server.service.impl.ElasticsearchServiceImpl.update(ElasticsearchServiceImpl.java:627)
...
at org.genesys2.server.service.impl.ElasticsearchServiceImpl.lambda$asyncUpdate$3(ElasticsearchServiceImpl.java:600)
...
Caused by: java.sql.SQLInvalidAuthorizationSpecException: (conn=203) Communications link failure with secondary host mariadb2:3306. Connection reset by peer (Write failed)
...
Caused by: java.sql.SQLException: Communications link failure with secondary host mariadb2:3306. Connection reset by peer (Write failed)
on HostAddress{host='mariadb2', port=3306, type='replica'},master=false. Driver has reconnect connection
at org.mariadb.jdbc.internal.failover.AbstractMastersListener.throwFailoverMessage(AbstractMastersListener.java:563)
at org.mariadb.jdbc.internal.failover.FailoverProxy.handleFailOver(FailoverProxy.java:391)
...
Caused by: java.sql.SQLNonTransientConnectionException: Connection reset by peer (Write failed)
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.handleIoException(AbstractQueryProtocol.java:2076)
...
Caused by: java.net.SocketException: Connection reset by peer (Write failed)
at java.base/java.net.SocketOutputStream.socketWrite0(Native Method)
```2021.2Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/589DownloadLog and incomplete downloads2021-04-16T14:28:06+02:00Matija ObrezaDownloadLog and incomplete downloadsWhen I start a MCPD download from the UI and then cancel the download, the server records a `Download was aborted: Closed` log message.
But a new `DownloadLog` entry is still registered in the database.
```
18:10:42,195 qtp1586845078-...When I start a MCPD download from the UI and then cancel the download, the server records a `Download was aborted: Closed` log message.
But a new `DownloadLog` entry is still registered in the database.
```
18:10:42,195 qtp1586845078-13 WARN o.g.s.s.i.DownloadServiceImpl:219 - Error generating: org.eclipse.jetty.io.EofException
18:10:42,203 qtp1586845078-13 WARN o.g.s.a.v.AccessionController:663 - Download was aborted: Closed
```
This should not write a new download log message.2021.2Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/588Session cookies on /api2021-05-19T08:14:19+02:00Matija ObrezaSession cookies on /apiA normal HTTP GET request to */api* should not generate new cookies:
![image](/uploads/7eefa65cf4300f6ba907059f3a55eb48/image.png)
A request to */api/v1/geo/iso3166/decode?locale=en* is quite frequent from the UI and it includes `JSESS...A normal HTTP GET request to */api* should not generate new cookies:
![image](/uploads/7eefa65cf4300f6ba907059f3a55eb48/image.png)
A request to */api/v1/geo/iso3166/decode?locale=en* is quite frequent from the UI and it includes `JSESSIONID` and `hz-session-id` in the request:
```
Cookie: GENESYS_sandbox.genesys-pgr.org=eyJhbGciOixxxx.eyJleHAixxx.e9piZqWpIxxxx; G_ENABLED_IDPS=google; G_AUTHUSER_H=1; JSESSIONID=node063vg9xhbqpul1z20x2tr6ov683.node0; hz-session-id=HZ72872DD6A59743BCBF6E66EAD733E702
```
Both relevant cookies `JSESSIONID` and `hz-session-id` are set to `SameSite` (i.e. api.sandbox.genesys-pgr.org).
They should be completely ignored for requests to */api*. It's even stranger that there are **two `hz-session-id` cookies** in the response?2021.2Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/587Download log with @CreatedBy2021-04-16T09:25:10+02:00Matija ObrezaDownload log with @CreatedByThe logging works nicely in production:
| id | controller | method | url | date | clientIp |
|----|----|----|----|...The logging works nicely in production:
| id | controller | method | url | date | clientIp |
|----|----|----|----|----|----|
| 1 | DatasetController | downloadDatasetFile | /api/v1/dataset/b9c8e4db-d6b1-44a8-b1a3-307c1f496daf/download/131077 | 2021-04-09 02:48:33.000000 | 181.xxxx |
| 2 | DatasetController | downloadDatasetFile | /api/v1/dataset/f6cd4e85-7e44-4429-b00d-9d9eb99ea0bb/download/3244033 | 2021-04-09 06:46:56.000000 | 154.xxxx |
| 3 | DatasetController | downloadDatasetFile | /api/v1/dataset/929a273d-7882-43eb-8b1a-86032cbeb892/download/3112961 | 2021-04-09 08:46:07.000000 | 154.xxxx |
It would be very useful if `createdBy` was also included in the database.2021.2Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/586Performance with Accessions /list as CSV2021-09-20T10:49:38+02:00Matija ObrezaPerformance with Accessions /list as CSVUsing the CSV format to retrieve large selections (pages) using the /list endpoint appear to be very slow (see https://gitlab.croptrust.org/genesys-pgr/genesysr/-/issues/2#note_53485).
We should explore two things:
1. Adding support to...Using the CSV format to retrieve large selections (pages) using the /list endpoint appear to be very slow (see https://gitlab.croptrust.org/genesys-pgr/genesysr/-/issues/2#note_53485).
We should explore two things:
1. Adding support to `exclude` fields (we now have `select` to include fields)
1. Not serializing things with `flatMap` that are not selected.
The response is now very broad and includes very deeply nested entities. We should explore what can be excluded.2021.2Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/582JaCoCo and SpotBugs2021-04-12T10:41:57+02:00Matija ObrezaJaCoCo and SpotBugsAdd JaCoCo and SpotBugs to `pom.xml` and update the pipeline. Use GG-CE server and app-blocks projects as examples.Add JaCoCo and SpotBugs to `pom.xml` and update the pipeline. Use GG-CE server and app-blocks projects as examples.2021.2Maxym BorodenkoMaxym Borodenko