gurock / testrail-docker

Official repo for TestRail docker support.
Apache License 2.0
54 stars 35 forks source link

Cannot execute this query as it might involve data filtering and thus may have unpredictable performance. If you want to execute this query despite the performance unpredictability, use ALLOW FILTERING #59

Open prawal10 opened 7 months ago

prawal10 commented 7 months ago

Hi, i have TestRail running in EKS and have External Mysql Database with Cassandra in the K8 cluster. I have recently upgraded TestRail from v7.0 to 7.5.3 becuas v7.0 doesn't use Cassandra so i did not faced any issue but now v7.5.3 is using Cassandra i am having trouble to create Testsuite and Testrun. I tried following the document - https://support.testrail.com/hc/en-us/articles/7104258815636-Upgrading-TestRail#01G7Y5CCC1FQKCRT8GX8NS62D2 and used the migration script but it just gives me error that attachment table is not there in Cassandra i did created table and required column manually after getting multiple while running the script. I thought Testrail will automatically create the required things in cassandra but i dont know if i am doing anything wrong here. While creating Testsuite i got the error. image

Any help would be much appreciated.

beeritis commented 6 months ago

This article should be useful - https://support.testrail.com/hc/en-us/articles/7261897470612-Cassandra-NoSQL-Database-Installation-on-Unix-Linux#spanstylefontweight400InstallApacheCassandraspan .

Make sure you have run this in cassandra prior to running the database upgrade in Testrail :

CREATE KEYSPACE IF NOT EXISTS testrail WITH REPLICATION={'class': 'SimpleStrategy', 'replication_factor': 1};

I ran into a similar issue once - worst case just revert to backup and rerun the upgrade process . The addition of Cassandra has created a whole multitude of issues !

prawal10 commented 6 months ago

Thank you for the comment. I tried the same thing, created the keyspace as per the command than ran the migration script php ./TestRailSqlToCassandraMigration.php -d9 -m"driver=mysql;host=xxxx;port=3306;database=xxx;user=xxx;password=xxx" -s"host=cassandra.xxx.svc.cluster.local;port=9042;keyspace=xxx;user=xxx;password=xxx" -i

but i get this error - Something went wrong: unconfigured table attachments

I dont want to create tables manually it shoudl be done by the migration script. My setup is in kubernetes, cassandra is running the kubernetes and i have external Mysql RDS.

Thank you

beeritis commented 5 months ago

You are correct it should be.

Mine is a similar setup Kubernetes, the tables should indeed be created when you run the database migration (via the webgui) . Were there any errors during that? I would start there / perhaps rerun the upgrade going from a backup from version 7.

The whole upgrade process is far from perfect, it took me many attempts to make it work.

Also their decision to add second database to testrail feels like a bit of an abomination . Probably another reason why there are so many issues/

prawal10 commented 5 months ago

I tried to import database to a new one and on webUI tried to update the dabase version. in. the next window i got error says ' check the details below' and there is no error specified. Then i checked the logs and saw this - "Database error code: 1146 (at Database_mysqli_driver->_throw_last_error) at Database_mysqli_driver->_throw_last_error (mysqli.php:122)"

did you also got the error? i am using AWs Mysql RDS 8, cassandra 3.11.12 php version in testrail pod PHP 7.3.33

MedUnes commented 5 months ago

@beeritis can't agree more, could you please paste the cassandra schema that made it work for you so far? thanks in advance