Bug Interest events stop

Status
Not open for further replies.

ichpen

Customer
I changed my internet rate to 0.1 and noticed that soon after the bank manager got angry and stopped paying daily interest entirely. Basically nothing logged in the transaction log at all and no interest paid after the first 2 days.
 
I can see there's a bug in which it does not accept negative numbers, which may have transformed your 0.1 into 0. If you edit the currency after changing it, does it say 0.1 or 0?
 
I can see there's a bug in which it does not accept negative numbers, which may have transformed your 0.1 into 0. If you edit the currency after changing it, does it say 0.1 or 0?

It says 0.1 but I don't have any daily interest events in the log (or actually happening) consistently. I'm not sure if it has to do with the value or if it's coincidental to me changing the value.

I did receive the first interest award after changing it to 0.1 then paused for Sunday now I just found out it worked yesterday (Mon). So it skipped one day so far.
 
Last edited:
Bear in mind the "Automatic interest: Activity threshold" setting. It does not allow for setting the value to 0, so if you did so, it would definitely cease providing interest payments.

That being said, I see that it is possible for a race condition to occur where the "Can collect interest" check would fail. Given the following scenario:
  • Day 1: User X's interest was delayed for 15 seconds after that day's first run of the cron job (a lot of users ahead of X in the queue)
  • Day 2: User X's interest was delayed for 14 or fewer seconds after that day's first run of the cron job (fewer users ahead of X in the queue, due to the "Activity threshold" mentioned above)
In this scenario, User X's interest would not meet the "must be exactly 86400 seconds (1 day) after the previous interest collection" check, and as such even the cron job would fail.

This was a flaw in the design that I did not consider. Starting with the next version, I've added an override switch that ensures the cron job interest is not subject to the "Can collect interest" check. This means that manually running the cron job multiple times will pay interest as many times as the user clicks to run it, but that's an acceptable trade-off compared to the idea of skipping users.

The only other solution would be to increase the frequency of the cron job, but that has performance concerns since with a large forum it's possible to select a large amount of users for update.
 
Bear in mind the "Automatic interest: Activity threshold" setting. It does not allow for setting the value to 0, so if you did so, it would definitely cease providing interest payments.

That being said, I see that it is possible for a race condition to occur where the "Can collect interest" check would fail. Given the following scenario:
  • Day 1: User X's interest was delayed for 15 seconds after that day's first run of the cron job (a lot of users ahead of X in the queue)
  • Day 2: User X's interest was delayed for 14 or fewer seconds after that day's first run of the cron job (fewer users ahead of X in the queue, due to the "Activity threshold" mentioned above)
In this scenario, User X's interest would not meet the "must be exactly 86400 seconds (1 day) after the previous interest collection" check, and as such even the cron job would fail.

This was a flaw in the design that I did not consider. Starting with the next version, I've added an override switch that ensures the cron job interest is not subject to the "Can collect interest" check. This means that manually running the cron job multiple times will pay interest as many times as the user clicks to run it, but that's an acceptable trade-off compared to the idea of skipping users.

The only other solution would be to increase the frequency of the cron job, but that has performance concerns since with a large forum it's possible to select a large amount of users for update.

Thanks for the detailed reply. Yes it wasn't the activity threshold that was the issue. Quite possibly a race condition but it's odd that all my users (I'm still testing this so only about 4 were signed up/deposited for interest) were skipped. Looking forward to the next version.
 
If it's a low activity site, it's quite possible that instead of there being a number of users affected, Day 1's cron job was just executed later.

F.ex.
Day 1: Cron job catches up at 00:05.
Day 2: Cron job runs somewhere between 00:00-00:04.
 
Hello @ichpen,

We hope your ticket regarding DragonByte Shop has been addressed to your satisfaction. This ticket has now been scheduled to be closed.

If your ticket has not been resolved, you can reply to this thread at any point in the next 7 days in order to reopen the ticket, afterwards this thread will be closed.

Please do not reply to this thread if your ticket has been resolved.

Thank you.


- DragonByte Technologies, Ltd.
 
Hello @ichpen,

As we have not heard back from you, your ticket regarding DragonByte Shop has now been closed.

If your ticket has not been resolved, please feel free to start a new support ticket and link back to this ticket.

If you have time, please leave a review on XenForo.com's Resource Manager.

Thank you.


- DragonByte Technologies, Ltd.
 
Status
Not open for further replies.

DragonByte Shop

XenForo 1.5.3+ XenForo 2.0.x XenForo 2.1.x XenForo 2.2.x
Seller
DragonByte Technologies
Release date
Last update
Total downloads
3,227
Customer rating
5.00 star(s) 3 ratings
Top