Taxes charging multiple times. #21


  • New
  • Defect
Open
Assigned to mitsugaru
  • _ForgeUser7844038 created this issue Jan 31, 2012

    What steps will reproduce the problem?
    1.
    2.
    3.

    What is the expected output? What do you see instead?
    I expect taxes and salaries to be paid/charged correctly, but when I stopped the server and logged back in today the treasury account had all of everyone's money; taxes must have been charged but not salaries. This happened once before but I was on when it happened.

    What version of the product are you using?
    1.15

    Do you have an error log of what happened?
    I'm not sure if this matters, but
    02:38 PM [INFO] [CashFlow] Running CatchUp
    02:38 PM [INFO] [CashFlow] Buffered iterations + Rescheduled threads

    Last Cashflow log before I checked my balance.
    Please provide any additional information below.
    Before this I submitted ticket 20, and the issue from that ticket was resolved.

  • _ForgeUser7844038 added an attachment config.yml Jan 31, 2012

    config.yml

    <p>config.yml</p>

  • _ForgeUser7844038 added the tags Defect New Jan 31, 2012
  • _ForgeUser7844038 posted a comment Jan 31, 2012

    When the server is running, taxes and salaries work correctly.

  • Mitsugaru posted a comment Jan 31, 2012

    Sorry for the late reply.

    Hey, so, are your salaries firing every twenty minutes?

    Do the command to restart the timers:
    /cashflow restart
    Wait about 20 minutes -ish and check your console that all salaries are firing, as well as players being given money. Have them check their balance before and after.

    Also, did you do the following command:
    /cashflow addplayers <world> to import all old players into the internal database?

    The CatchUp sequence is only for CashFlow to do the missed iterations while the server is offline. So, if a tax/salary was supposed to fire while the server was off, it'll know that.

  • Mitsugaru removed a tag New Jan 31, 2012
  • Mitsugaru added a tag Waiting Jan 31, 2012
  • _ForgeUser7844038 posted a comment Jan 31, 2012

    It's OK. When the server is up everything is fine, my players have confirmed it for me. The only problem is that when I restarted it today I had pretty much no money and everyone else had none. I think it taxed but did not pay salaries when it caught up. Is this possible? The treasury had way more money after as well so I know it taxed. Could the catch up interval have anything to do with it?

  • _ForgeUser7844038 removed a tag Waiting Jan 31, 2012
  • _ForgeUser7844038 added a tag Replied Jan 31, 2012
  • Mitsugaru posted a comment Jan 31, 2012

    @Gamemasher: Go

    The interval is just the initial delay before the CatchUp process runs, and it only runs once after the server is completely loaded. So, ideally, you want the interval lower than the lowest interval tax/salary that you have enabled... which you appear to adhere to.

    [EDIT]

    OH HELL, I see where I screwed up...
    I am going to push version 1.17 to BukkitDev.
    In the meantime, try the following version and let me know if it does the salaries correctly for the CatchUp sequence:
    https://github.com/mveritym/CashFlow/downloads

    Sorry for the troubles that time persistence caused. Thank you for finding the mistake.
    Reply with your findings.

  • Mitsugaru removed a tag Replied Jan 31, 2012
  • Mitsugaru added a tag Accepted Jan 31, 2012
  • _ForgeUser7844038 posted a comment Jan 31, 2012

    OK, I'll make sure to get back to you. My server crashed anyways from a friend using too much TNT so I'll wait 20 mins before restarting and see if the salaries were paid correctly.


    Edited Jan 31, 2012
  • _ForgeUser7844038 posted a comment Jan 31, 2012

    Yay after fixing my server, restarting it, and waiting a few mins I was paid and taxed the correct amount of money. Looks like it works as expected now :)


    Edited Jan 31, 2012
  • _ForgeUser7844038 posted a comment Jan 31, 2012

    It's still working except for the fact that it just paid all salaries three times in a row, within a few secs of each other.


    Edited Jan 31, 2012
  • Mitsugaru posted a comment Jan 31, 2012

    @Gamemasher: Go

    Well, yes, that's the CatchUp sequence doing its thing.

    So, for instance in your case as the example:

    You shut down the server for a bit over an hour. When you next start it, the catch up sequence will look at all enabled taxes/salaries and look at when they were last executed. It will then calculate if there were any missed intervals. Afterwards, it will execute the tax/salary for the number of intervals that it missed. So, for one hour of off time, it would fire all of your salaries at least three times (since the interval for yours is 20 minutes -ish).

    This is the entire point of time persistence.

    So, it sounds like its working again, so I'll go ahead and mark this ticket as fixed.

  • Mitsugaru removed a tag Accepted Jan 31, 2012
  • Mitsugaru added a tag Fixed Jan 31, 2012
  • Mitsugaru closed issue Jan 31, 2012
  • _ForgeUser7844038 posted a comment Jan 31, 2012

    No, I mean it randomly pays three salaries. It just did it again without me restarting the server.


    Edited Jan 31, 2012
  • Mitsugaru posted a comment Jan 31, 2012

    Do you mean 3 off the same salary? o.o

    Last I checked, you had multiple salaries...

  • Mitsugaru removed a tag Fixed Jan 31, 2012
  • Mitsugaru added a tag Declined Jan 31, 2012
  • Mitsugaru removed a tag Declined Jan 31, 2012
  • Mitsugaru added a tag Waiting Jan 31, 2012
  • Mitsugaru reopened issue Jan 31, 2012
  • _ForgeUser7844038 posted a comment Feb 1, 2012

    I was playing and it said on my screen something like [Cashflow] You nhave been paid $2000 for your salary God." Except it said it three times and I was paid $6,000. Everyone on the server got triple money and this happened twice. The same thing happened with taxes once except it only taxed twice. These issues appear to happen randomly as Cashflow works perfectly most of the time.

  • _ForgeUser7844038 removed a tag Waiting Feb 1, 2012
  • _ForgeUser7844038 added a tag Replied Feb 1, 2012
  • Mitsugaru posted a comment Feb 1, 2012

    @Gamemasher: Go

    That's sorta weird... Hmm...

    IDK why it would be applying the same salary/tax for you more than once... the code insures that a player should only be paid/taxed only once for any given salary/tax...

    So, the only option based off that is that it is somehow firing the tax/salary more than once for any given interval... for some odd reason...

    I'll play around with your config and see what happens... I'm not entirely sure why its happening and its the first I've heard of the issue...

  • Mitsugaru removed a tag Replied Feb 1, 2012
  • Mitsugaru added a tag New Feb 1, 2012
  • _ForgeUser7844038 posted a comment Feb 3, 2012

    Thanks for that. Right now it just taxed me three days in a row and only paid me one of those days. It seems to work most of the time but it bugs out every once in a while.

  • Mitsugaru unassigned issue from _ForgeUser7428650 Feb 23, 2012
  • Mitsugaru self-assigned this issue Feb 23, 2012

To post a comment, please login or register a new account.