Closed tesshucom closed 3 years ago
It takes a long time to verify and is not a fatal issue. Also it is a latent bug that has existed for some time. (Alternatively, Subsonic may claim it as the specification...!)
So it will not be addressed in v109.4.0. (Depending on the modification method, the performance will be significantly affected.) Add a workaround fix to the test case. If it matches the expected result on Linux (Ubunts), the test case will be skipped and a warning will be displayed. Consider countermeasures in later versions.
Temporary evasion was done at 242f5f7b1bddaaae78c15b5105e99ecfe84f2e9d. Will do these additional investigations and, if possible, revert and improve.
Music2 scan results differ between Windows and Ubuntu.
(MediaFile) id:18, name:DIR chrome hoof - 2004, genre:Metal (Genre) id:Gothik Folk Psychobilly, albumCount:1, songCount:3 id:Impressionist Era, albumCount:1, songCount:2 id:Baroque Instrumental, albumCount:1, songCount:2 id:Metal, albumCount:1, songCount:1 id:Alternative/Indie, albumCount:0, songCount:1
(MediaFile) id:17, name:DIR chrome hoof - 2004, genre:Alternative/Indie (Genre) id:Gothik Folk Psychobilly, albumCount:1, songCount:3 id:Impressionist Era, albumCount:1, songCount:2 id:Baroque Instrumental, albumCount:1, songCount:2 id:Metal, albumCount:0, songCount:1 id:Alternative/Indie, albumCount:1, songCount:1
Due to Subsonic specifications, the correct result is the scan result on Windows. There is a possibility that the order of the files cannot be obtained correctly on Ubuntu due to some problem.
It doesn't seem to be a simple bug. As a result of adding some validation, it was not possible to solve the problem immediately, so I will postpone it.
Problem description
The genre count of the album may change depending on your environment.
The order of recent-albums may vary depending on your environment.
SearchServiceLegacyTest#testGetChildSizeOf
Dao does not sort when retrieving child elements of a directory. This is because performance is taken into consideration and unnecessary implementations are omitted. If the exact order of child elements is required when retrieving the child elements of a directory, use the dedicated methods found in the service. This sorts the child elements retrieved from Dao in Java. These are the design concepts since Subsonic.
The implementation of legacy scans is a bit complicated. If sorting is not theoretically required, Dao is used directly. For example, if you register the file order acquired by POSIX in the DB and retrieve it without sorting, it should work in most cases if it is returned in the record registration order. Sorting is omitted in such places. (This is presumed to be a performance consideration, not a bug in itself)
Steps to reproduce
Run the build with Maven in Github action. The contents of the genre master are different between Windows and
Ubuntu
. A phenomenon similar to this has been reported by Airsonic in the past, but has not been reproduced until now.Occurs in SNAPSHOT after 12/17(Before that, it was the same behavior).
https://github.com/actions/virtual-environments/issues/1816
System information
Ubuntu
Additional notes
This is a reproduction case where the genre count of the album can change depending on the environment. In the case of test data and test cases attached to the project, among the Album genres, the Metal genre may be counted as 1 or 0. The order of the files has a lot to do with determining the genre of an album.
The album genre determination logic is dynamic and Subsonic specific. Therefore, if the genre determination conditions differ due to environmental differences, the results may change. For example, when there are multiple genres in an album and the file order differs depending on the OS. Or, a type of false positive that occurs rarely.
This issue itself will be treated as a bug and fixed.