-
Notifications
You must be signed in to change notification settings - Fork 172
SD EPG fixes [ci release] #493
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
0305774 to
978d1e6
Compare
Narflex
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall good, please address the comments and explain the maintenance issue in the EPG class. (note to self, I reviewed everything completely except EPG.java)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you deleting this file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry. This must have occurred by mistake during my squashing as their was a conflict. I will add it back in in another commit.
java/sage/EPG.java
Outdated
|
|
||
| if (Sage.time() - wiz.getLastMaintenance() > MAINTENANCE_FREQ) | ||
| reqMaintenanceType = MaintenanceType.FULL; | ||
| if(Sage.getBoolean("wizard/scheduled_maintenance", false)){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like you're disabling Wizard maintenance here unless this new property is set (which it will not be by default of course). That's not good, as that will lead to memory bloat if the DB doesn't run it's regular maintenance routine (and users will run out of memory sooner than later without DB maintenance). You may be misunderstanding what 'maintenance' is here...and it's when the Wizard runs through the database and clears out the old unneeded data...it's orthogonal to EPG updates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not my intention here. This is still running maintenance but at a specific hour every day. If this property is set to true it still sets maintenance to FULL but the timing is based on the scheduled_maintenance_offset (hour of day) having passed. Hope that makes sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, now I see...I missed the 'else' on this conditional below before. :) However, to avoid confusion...can you rename the 'EPG update offset' to be something like that...such as wizard/scheduled_epg_update? Maintenance in SageTV does not refer to EPG updates...it refers to when the DB is analyzed and all expired records are removed to reduce memory usage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. I will also mention the change to andy as he uses these properties in his STV change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW: Will this new epg scheduled update control affect all types of epg updates, or only Schedules Direct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will affect all types of EPG updates...but only if the user has enabled those options.
|
That "approve changes" you see was just for a single commit (and maybe more after that)...I forgot the review applies to the whole PR. :) |
Narflex
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fully approve "SD EPG Updates - added seeker/duration_for_watchdog to allow users to…"
Narflex
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fully approve: "Github actions - changed to 20.04 as 18.04 is no longer supported"
Narflex
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The commit for "Revert "Add properties to allow changing locator server"" shouldn't be in here...you likely need to do a local 'git pull' from the sagetv repo and then rebase your local branch on top of that...then it should remove that commit from your history.
Narflex
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should squash this commit w/ the other one for the changes to build.gradle, then at least the Linux versioning portion will be more clear.
Narflex
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Release for version 9.2.9 [ci release]" is approved
… extend this process wait if causing issues with large libraries SD EPG Updates - seeker/duration_for_watchdog - fixed debug message to include valid duration
8cff323 to
cbb0c7a
Compare
e5cba2e to
9dc22cf
Compare
java/sage/EPG.java
Outdated
|
|
||
| if (Sage.time() - wiz.getLastMaintenance() > MAINTENANCE_FREQ) | ||
| reqMaintenanceType = MaintenanceType.FULL; | ||
| if(Sage.getBoolean("wizard/scheduled_maintenance", false)){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, now I see...I missed the 'else' on this conditional below before. :) However, to avoid confusion...can you rename the 'EPG update offset' to be something like that...such as wizard/scheduled_epg_update? Maintenance in SageTV does not refer to EPG updates...it refers to when the DB is analyzed and all expired records are removed to reduce memory usage.
java/sage/EPG.java
Outdated
| if ((Sage.time() - wiz.getLastMaintenance() > MAINTENANCE_FREQ) || ((nextScheuldedMaintenanceTime - MAINTENANCE_FREQ) < Sage.time())){ | ||
| if (Sage.DBG) System.out.println("EPG next scheduled update is ready to run as we are past the maintenance window and/or scheduled time"); | ||
| reqMaintenanceType = MaintenanceType.FULL; | ||
| }else if(wiz.getLastMaintenance()==0){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you need this 'else if' block here, because of wiz.getLastMaintenance() is zero...then the first part of the 'if' would be triggered...so this block will never be executed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. Removed (I believe I added while testing so I could force an update on restart by setting it to 0 but should have removed this).
java/sage/EPG.java
Outdated
| if(Sage.getBoolean("wizard/scheduled_maintenance", false)){ | ||
| if (Sage.DBG) System.out.println("EPG next scheduled maintenance offset is " + Sage.getInt("wizard/" + SCHEDULED_MAINTENANCE_OFFSET, 0)); | ||
|
|
||
| nextScheuldedMaintenanceTime = getNextScheduledMaintenanceTime(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nextScheuldedMaintenanceTime is misspelled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
java/sage/EPG.java
Outdated
| //determine the wait until the next scheduled update time | ||
| //calc the next time as the user may have changed the schedule settings | ||
| nextScheuldedMaintenanceTime = getNextScheduledMaintenanceTime(); | ||
| minWait = nextScheuldedMaintenanceTime - Sage.time(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't there a problem where if you set minWait in this block...then it can get overridden on line 687 with the one from the EPGDataSource? So the scheduled maintenance only takes effect if the last EPGDataSource has an update time further out then the scheduled time. It seems like this check should be outside of this loop to override the other update timing logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
| sageJar.dependsOn cleanSageJar, classes, test | ||
| miniclientJar.dependsOn clean, miniclientClasses, cleanMiniJar | ||
| linuxMiniClientRelease.dependsOn miniclientJar | ||
| sageJar.finalizedBy restoreSageConstants |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this line removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed (commented out when I was trying to get the commit number code working again after move to ubuntu 22.04)
|
All the latest changes look good. I just want to build it locally and install it on my server now for a couple days to test it. :) I'll also trigger the CI runs as well. If all goes well, then I'll merge it in a few days. |
|
And for some reason I'm having problems building this locally...given other people have done plenty of testing on it, I'll just merge it once Andy does the required STV changes because the property names have been changed. |
|
Just figured out my local build issue (wrong version of Java) so now I have it built and will also test it...now that it's all been merged. :) |
Various commits to fix the SD EPG issues