CancerDB icon indicating copy to clipboard operation
CancerDB copied to clipboard

Race condition?

Open breck7 opened this issue 3 years ago • 2 comments

https://cancerdb.com/search.html?q=notMissing+uscsMortalityRate%0D%0Aselect+uscsMortalityRate+uscsDeathsPerYear%0D%0AsortBy+uscsMortalityRate%0D%0Areverse%0D%0Atitle+Highest+mortality+rates%0D%0Adescription+Annual+cancer+deaths+divided+by+annual+new+cases.+Not+a+perfect+measure+but+gives+a+rough+estimate+of+deadliness+of+cancer+types.+Data+is+from+the+2019+United+States+Cancer+Statistics+dataset+from+the+CDC.

Sometimes when I start the site the above query works. Sometimes it doesn't. For some reason uscsMortalityRate does not get set in this line extendedTqlGrammar.getNode("columnNameCell").set("enum", folder.colNamesForCsv.join(" "))

I tried a few dumb things to debug but couldn't figure it out. Smells like a race condition, but even that I'm not sure about.

I guess it happens both on Mac and Linux.

breck7 avatar Mar 14 '23 19:03 breck7

@breck7 : If truebase allowed for deployment using both compiled (or built) data-store and in memory data-store, it could be easier to debug, your thoughts. Else people could spend too much time with the debugger because of their chosen method of deployment.

ghost avatar Mar 15 '23 04:03 ghost

@SRS-WRKS I think we should get there. I did add a dumpStaticSite command to TrueBase, but haven't cleaned it up yet nor added tests (it doesnt work great). That shouldn't be too hard. Then we will easily be able to reproduce the old behavior where the site was static.

At some point the code should be good enough that we may easily be able to do something neat: hold the whole site in memory in the browser and run the full site (including search and TQL queries) client side with no server at all.

But that might be a year or two before we get there :)

I agree, dumping the static site can often help debug issues faster so that will be my priority.

breck7 avatar Mar 16 '23 00:03 breck7

Fixed with the move to scrollsets :)

breck7 avatar Sep 01 '24 04:09 breck7