You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{
"data": {
"total": 2,
"results": [
{
"torrent_id": 1,
"uploader": "user01",
"info_hash": "9e0217d0fa71c87332cd8bf9dbeabcb2c2cf3c4d",
"title": "A Mandelbrot Set 2048x2048px picture",
"description": "A beautiful Mandelbrot Set picture in black and white. \n - Hybrid torrent V1 and V2. \n - Single-file torrent. \n - Public. \n - More than one tracker URL. \n",
"category_id": 10,
"date_uploaded": "2022-11-04 07:19:18",
"file_size": 9219566,
"seeders": 0,
"leechers": 0
},
{
"torrent_id": 2,
"uploader": "user01",
"info_hash": "0902d375f18ec020f0cc68ed4810023032ba81cb",
"title": "Two Mandelbrot Set 2048x2048px pictures",
"description": "Two beautiful Mandelbrot Set pictures in black and white. \n - Hybrid torrent V1 and V2. \n - Multiple-files torrent. \n - Private. \n - Only one tracker URL. \n",
"category_id": 10,
"date_uploaded": "2022-11-04 07:19:18",
"file_size": 9219566,
"seeders": 0,
"leechers": 0
}
]
}
}
Actual response:
{
"data": {
"total": 1,
"results": [
{
"torrent_id": 1,
"uploader": "user01",
"info_hash": "9e0217d0fa71c87332cd8bf9dbeabcb2c2cf3c4d",
"title": "A Mandelbrot Set 2048x2048px picture",
"description": "A beautiful Mandelbrot Set picture in black and white. \n - Hybrid torrent V1 and V2. \n - Single-file torrent. \n - Public. \n - More than one tracker URL. \n",
"category_id": 10,
"date_uploaded": "2022-11-04 07:19:18",
"file_size": 9219566,
"seeders": 0,
"leechers": 0
}
]
}
}
How to reproduce
Run this backend test: cargo test upgrades_data_from_version_v1_0_0_to_v2_0_0 -- --nocapture. It's still only available on PR Command to migrate DB data from v1.0.0 to v2.0.0 #77 77. That will produce a tests DB in thetests/upgrades/from_v1_0_0_to_v2_0_0/output dir.
Run the tracker
Run the backend using the previously generated database.
Click on the torrent name to go to the torrent details page and back to the previous list page. You will now see two torrents.
If you go to the DB and delete all records in the torrust_toprrent_tracker_stats, you will see only one result again.
Conclusion
There must be a problem with the SQL sentence. Maybe there is an inner join that uses that table.
The torrent that does not appear is private if that helps find the issue.
Attachments
The bug. THe list with only one torrent.
The torrent detail page.
The correct list page with two torrents.
The stats table with one record. ONce you have that record, the list page is right.
Endpoint: http://0.0.0.0:3000/torrents?page_size=20&page=0&sort=UploadedDesc&categories=&search=
Expected response:
{ "data": { "total": 2, "results": [ { "torrent_id": 1, "uploader": "user01", "info_hash": "9e0217d0fa71c87332cd8bf9dbeabcb2c2cf3c4d", "title": "A Mandelbrot Set 2048x2048px picture", "description": "A beautiful Mandelbrot Set picture in black and white. \n - Hybrid torrent V1 and V2. \n - Single-file torrent. \n - Public. \n - More than one tracker URL. \n ", "category_id": 10, "date_uploaded": "2022-11-04 07:19:18", "file_size": 9219566, "seeders": 0, "leechers": 0 }, { "torrent_id": 2, "uploader": "user01", "info_hash": "0902d375f18ec020f0cc68ed4810023032ba81cb", "title": "Two Mandelbrot Set 2048x2048px pictures", "description": "Two beautiful Mandelbrot Set pictures in black and white. \n - Hybrid torrent V1 and V2. \n - Multiple-files torrent. \n - Private. \n - Only one tracker URL. \n ", "category_id": 10, "date_uploaded": "2022-11-04 07:19:18", "file_size": 9219566, "seeders": 0, "leechers": 0 } ] } }Actual response:
{ "data": { "total": 1, "results": [ { "torrent_id": 1, "uploader": "user01", "info_hash": "9e0217d0fa71c87332cd8bf9dbeabcb2c2cf3c4d", "title": "A Mandelbrot Set 2048x2048px picture", "description": "A beautiful Mandelbrot Set picture in black and white. \n - Hybrid torrent V1 and V2. \n - Single-file torrent. \n - Public. \n - More than one tracker URL. \n ", "category_id": 10, "date_uploaded": "2022-11-04 07:19:18", "file_size": 9219566, "seeders": 0, "leechers": 0 } ] } }How to reproduce
cargo test upgrades_data_from_version_v1_0_0_to_v2_0_0 -- --nocapture. It's still only available on PR Command to migrate DB data fromv1.0.0tov2.0.0#77 77. That will produce a tests DB in thetests/upgrades/from_v1_0_0_to_v2_0_0/outputdir.A Mandelbrot Set 2048x2048px picture.torrust_toprrent_tracker_stats, you will see only one result again.Conclusion
There must be a problem with the SQL sentence. Maybe there is an inner join that uses that table.
The torrent that does not appear is private if that helps find the issue.
Attachments
The bug. THe list with only one torrent.
The torrent detail page.
The correct list page with two torrents.
The stats table with one record. ONce you have that record, the list page is right.