Closed dklann closed 1 year ago
Unable to reproduce here.
What was the providence of the Rivendell database used here? Was it created anew, or was it from an earlier version of Rivendell that was updated to v4.0.0rc2? Any chance that I could get a copy of the DB, along with a sample traffic import file?
Thanks for checking Fred! As far as I know, this started as a "jammy" "repo-installed" Rivendell instance on Mint 21. The install happened before I started working with this station. On 31 March I updated to current (all packages, including rivendell) using apt-get dist-upgrade
. We had not attempted importing traffic using the previous (4.0.0rc0-1) version of Rivendell.
Unfortunately, the backup from before I modified the database has already aged out. I'll send a current copy of the database and a traffic import via direct email.
Since you're unable to reproduce the problem, are you saying that your database includes these columns?
I don't see any code that mentions these column names in utils/rddbmgr/updateschema.cpp
I do see this code in the method RDSvc::import
in lib/rdsvc.cpp (starting at line 531) where it would refer to those column names:
sql=QString("select ")+
...
"`"+src_str+"TRANS_TYPE_OFFSET`,"+ // 22
"`"+src_str+"TRANS_TYPE_LENGTH`,"+ // 23
...
Thanks for your thoughts on this!
Received the DB. Thank you.
Still unable to reproduce the problem. In addition to the environment you documented above (Mint 21 w/ DEB packages), I've tried current Git 'qt5', on both Mint 21 and CentOS 7. In all cases, the log was merged as expected with no errors or exceptions. (See your e-mail for a listing).
This one's a bit of a puzzler...
Since you're unable to reproduce the problem, are you saying that your database includes these columns?
TFC_TIME_TYPE_LENGTH TFC_TIME_TYPE_OFFSET TFC_TRANS_TYPE_LENGTH TFC_TRANS_TYPE_OFFSET
They are not present, nor should they be.
I do see this code in the method RDSvc::import in lib/rdsvc.cpp (starting at line 531) where it would refer to those column names:
So we do have a potential code path that could generate them. That should only be called with ```src_str="MUS";''' though. Gives us some bread crumbs to follow though.
'Kay, I was finally able to reproduce this here.
The test DB you sent contains the following fields that are not part of the base schema:
Did you add these manually (perhaps in the course of troubleshooting), or did they just appear on their own?
Yes, I manually submitted the necessary ALTER TABLE
SQL statements to add those four columns.
Cool. That was the answer I was hoping for. :)
Fixed in 73dd55b. Please test (without the added fields).
Wow. Quick! Thanks, I'll test as soon as I have a moment to build and run that commit...
Wow. Quick!
Truth be told, I had that commit lined up and waiting. Just needed to be sure that we didn't have something that was generating those two "oddball" fields first.
Confirmed working here. Thanks again for the fix @ElvishArtisan.
Using version 4.0.0rc2-1 from the Paravel repository on Linux Mint 21, up-to-date.
Here is the output of
dpkg-query --no-pager --list \*rivendell\*
What I Did
Defined a custom traffic import template and proceeded to test traffic import.
What I Expected To Happen
I expected to see a successful test and then be able to merge traffic with a generated log.
What Happened
The test failed and I observed the following error in the system journal:
And the same thing for the following three columns:
TFC_TRANS_TYPE_LENGTH
TFC_TIME_TYPE_OFFSET
TFC_TIME_TYPE_LENGTH
How I Worked Around The Issue
I manually added those columns to the SERVICES table in the database and the traffic import test succeeded. Then generated a log and successfully merged traffic.
More Discussion
I searched for those four column-name strings in the source tree with
grep -E -r '(MUS|TFC)_(TIME|TRANS)_TYPE_(LENTGH|OFFSET)' .
). The only "grep hits" were references to the MUS instances of the column names. There were no references to the TFC columns in the code.Maybe the TFC columns were missed in commit 7c8fbeacb841 when the MUS columns were added to the database schema?