Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Christopher Davenport
    @ChristopherDavenport
    We either have a bug somewhere or my example is wrong, I’ll post shortly.
    Tim Spence
    @TimWSpence
    @ChristopherDavenport I think I took the naming from cats effect Ref but honestly can’t remember :joy: Open to being persuaded we should rename
    This is one reason I was keen to have a bigger example working. What’s the behaviour? If it hangs, it could be because of the bug I mentioned above
    Were you going to update the version in your PR? Then I can merge it and mine after and we’ll see if that helps
    Christopher Davenport
    @ChristopherDavenport
    It's indeed hanging.
    Updated my PR for the version change.
    Tim Spence
    @TimWSpence
    Well that’s promising! I’ll merge yours and then mine and we’ll see if that fixes it
    Yes, I saw. Thank you!!
    Christopher Davenport
    @ChristopherDavenport
    Hoping once you merge in your PR it won't hang that way and my doc can complete succesfully.
    Tim Spence
    @TimWSpence
    Me too!
    Yours is merged. Thanks very much! Just updating my branch now
    Christopher Davenport
    @ChristopherDavenport
    I'm opting for straight code for the first pass, and then I'll add more complex instructions. I'm breaking from the paper in that I want it to compile in-line. So Rather than sketching api's and later filling it out, instead just creating them and explaining how they suit the purpose.
    (Not sure if this is the best approach, but the papers approach is definitely not very friendly to repl style development)
    Tim Spence
    @TimWSpence
    merged crosses fingers
    I honestly can’t remember how the paper structures the example. Is it not a direct translation?
    Christopher Davenport
    @ChristopherDavenport
    It is a translation, with a few changes. I could do it 1 for 1 but it would be non-idiomatic scala.
    Tim Spence
    @TimWSpence
    I’m going to bed now but I’ve merged my fix so let me know if it helps!
    Christopher Davenport
    @ChristopherDavenport
    Alright, deadlock seems to persist. Probably my fault.
    Tim Spence
    @TimWSpence
    :sob: I’m not sure it is - I put in a println every time a txn is committed and it stops printing at the same time, which is suspicious
    Also, could you please run scalafmt on your change? And there are a couple of instances where two words do not have a space between them in the reindeer description (“themto”, “is both”, etc). Thanks so much!
    I’ll try to get a chance to look at the hanging today
    Christopher Davenport
    @ChristopherDavenport
    Totally, will get to it as soon as I get to a computer.
    Tim Spence
    @TimWSpence
    Thanks Chris! I saw the updates to the description, did you run scalafmtas well? Apologies if I’ve just missed it!
    Christopher Davenport
    @ChristopherDavenport
    Scalafmt is the bane of my existence, I constantly forget it I apologize for the million times this will happen.
    Tim Spence
    @TimWSpence
    :joy: no problem!
    I am also awful at it
    Christopher Davenport
    @ChristopherDavenport
    How do I run that, doesn’t seem to have the plugin
    Tim Spence
    @TimWSpence
    oh whoops! Maybe I’ve just installed it as a global plugin.
    Thanks, just saw you added it to your PR :)
    apparently I forgot to run it as well :joy:
    Tim Spence
    @TimWSpence
    @ChristopherDavenport so sorry, I added a comment on the PR - I think the standard seems to be a scalameta implementation of the formatter, which seems to give different results (I think that’s why you got so many changes when you ran it). I’m so sorry to be a pain but would you mind adding that one instead and running the formatter again. I’ve added the import line you need in a comment on the PR so should only take a minute
    Again, my bad for using a global plugin. I should have committed a project plugin ages ago
    Christopher Davenport
    @ChristopherDavenport
    Ok I tried again.
    Tim Spence
    @TimWSpence
    Thanks so much! Did you just run sbt scalafmt? I’m wondering if i wasn’t formatting the tests when I was running it...
    Christopher Davenport
    @ChristopherDavenport
    Yeah, I rant sbt scalafmt test:scalafmt
    Technically as two commands.
    Tim Spence
    @TimWSpence
    Ha!
    Awesome. I’ll merge asap this evening. Many thanks again! :)
    Christopher Davenport
    @ChristopherDavenport
    Hoping I screwed up somewhere. Not really sure whats hanging.
    Tim Spence
    @TimWSpence
    Me too! :joy: To be honest, I’m much more suspicious of the code that tracks retries of whole transactions (inside atomically). Based on a few random print statements I chucked in this morning, I think it stops retrying after a while
    but that was just 5 minutes of debugging
    and I’m pretty sure that logic is already dodgy - we’re not tracking which txns we’ve already retried or which ones have already succeeded
    just haven’t had time yet to think through what the behaviour should even be, never mind how to implement it
    Ross A. Baker
    @rossabaker
    test:scalafmt implies scalafmt
    I once automated Travis to just do that if the user forgot, but it annoyed people to have Travis append to their PRs.
    Christopher Davenport
    @ChristopherDavenport
    Was that fork the issue? That looks promising to what would result in a deadlock./
    Tim Spence
    @TimWSpence
    Sorry @ChristopherDavenport what looks like it would result in deadlock? I’ve got a branch with a rewrite of the pending txn logic which works most of the time but still deadlocks occasionally so there’s obviously something I’m still missing :sob:
    Christopher Davenport
    @ChristopherDavenport
    Do you have any work I could base investigation on? Would love to try to find whatever deadlock we’ve run into.
    Tim Spence
    @TimWSpence
    Thanks Chris! Yeah, I’ve struggled to find time the last week. I would love to fix it too! I’ve got some stuff I’ll push tomorrow morning
    Tim Spence
    @TimWSpence
    Hey @ChristopherDavenport I actually merged some of my changes as they fix some definite bugs around retries and they don’t always lock up when running the santa claus problem. I’ve also pushed to a branch debug-santa-claus that you might want to look at. At the moment, all it has is two print statements looping in fibers but the interesting thing is that they keep printing even when the santa problem stops so I don’t think we have thread deadlock. It looks to me like we aren’t correctly identifying/tracking opporunities to retry txns. The print shows that it gets stuck in a state where there are some pending transactions that never get retried