Page 1 of 1

queue item moves position when high priority item arrives

Posted: October 19th, 2017, 1:52 am
by OneCD
Hello,

Please excuse the terrible description.

SAB 2.3.x (it's a mix of 2.3.0 and 2.3.1 - and hopefully that's not the reason I'm having trouble. ;D )
Glitter - Night interface.

Problem: I have a normal (default) priority item that is at the top of the queue, and (because it was missing blocks), SAB has dutifully started downloading the internal PARs so it can be fixed.

Then, a high-priority item arrives, and proceeds to jump to the top of the queue.

The problem is the previous normal-priority item then gets pushed to the far end of the normal queue. I have to go find it and bring it to the top of the queue again so it sits below the new high-priority item.

This has happened a few times and I'm still trying to narrow down exactly when it occurs. I usually discover it when checking the queue for that item I was waiting to finish, then finding that it's not there as it's now at the end of the 'normal' queue.

From memory, when a queue item is downloading PARs, I saw them assigned a 'force' priority level, so a 'high' level item shouldn't displace it. And it shouldn't get sent to the end of the line. ;)

I've also check the SAB logs as I've noticed it records when I move something manually around ("Switching job [ ]", etc...) - but there's nothing at the point where it began downloading the high priority item to indicate that the original item was moved in the queue.

Thoughts?

Re: queue item moves position when high priority item arrives

Posted: October 19th, 2017, 3:03 am
by safihre
Do you maybe have Sort by Age turned on in Config Switches?
Otherwise I'll have to investigate, indeed fetching extra pars normally happens with a higher-than-force priority.

Re: queue item moves position when high priority item arrives

Posted: October 19th, 2017, 3:32 am
by OneCD
"Sort by Age" is off (unchecked)

Feels like this might be related to the recent problems regarding priority assignment for categories. ;)

Re: queue item moves position when high priority item arrives

Posted: October 19th, 2017, 7:18 am
by safihre
I couldn't reproduce it.
Only Force-priorities take precedence over Repair ones when I tested it.

Re: queue item moves position when high priority item arrives

Posted: October 20th, 2017, 1:04 pm
by OneCD
Some more info here.

I had a queue item that had moved into the download PARs stage so I checked its priority - it showed as 'normal'. As I clicked away, the item then jumped to the end of the normal queue. This is also something that's happened before. The interface seems to think that I have just changed the priority when I didn't. ;)

Here's the log from when job "abcd" finished, was then added back into the queue, and then I examined the priority setting via the interface (the last line):

Code: Select all

2017-10-21 00:33:50,237::INFO::[nzbqueue:776] Ending job abcd
2017-10-21 00:33:50,438::INFO::[postproc:667] Re-added abcd to queue
2017-10-21 00:34:25,556::INFO::[postproc:676] Verification and repair finished for abcd
2017-10-21 00:36:07,044::INFO::[assembler:96] Decoding abcd/<HASH>efbc9b3.vol001+002.par2 yenc
...
2017-10-21 02:28:10,642::INFO::[assembler:96] Decoding /share/downloads/sabnzbd/incomplete/abcd/<HASH>efbc9b3.vol063+064.par2 yenc
2017-10-21 03:47:06,121::INFO::[nzbqueue:686] Set priority=0 for job abcd => position=171 
I then located job "abcd" and assigned it 'force' priority:

Code: Select all

2017-10-21 03:49:29,374::INFO::[nzbqueue:686] Set priority=2 for job abcd => position=0
I also have "Download all par2 files" checked.

Re: queue item moves position when high priority item arrives

Posted: October 20th, 2017, 1:33 pm
by safihre
Yes, that's indeed a form of bug.
Because the interface doesn't know the REPAIR priority, and thus it defaults to the the Normal priority. It then detects this as a user-action and sends the update to the API.
Will fix that, by hiding the Priority-box for extra-par jobs.

Re: queue item moves position when high priority item arrives

Posted: October 20th, 2017, 1:47 pm
by safihre
Hahah, I see now that my previous fix to get a time-left on par2-fetching jobs that I made for you, caused this.
It's in the small details, but now I'll fix both correctly.

Re: queue item moves position when high priority item arrives

Posted: October 20th, 2017, 1:52 pm
by OneCD
Ah, cool. Thank you. :)