pohart

joined 1 year ago
[–] pohart@programming.dev 1 points 10 months ago* (last edited 10 months ago)

This is so hard because every one of his arguments is wrong, but the worst thing is that he's arguing this at all.

[–] pohart@programming.dev 4 points 10 months ago (1 children)

But be prepared that you've figured out our and she still wants to end it.

Often when someone has decided to end things they have already put in the effort they're going to (even if that's none) and they're done trying.

[–] pohart@programming.dev 10 points 10 months ago* (last edited 10 months ago)

0.2 mm would probably be plenty

[–] pohart@programming.dev 18 points 10 months ago (6 children)

The American catholics who i know love Francis and think it's taken too long to get him. Anecdotal, but I think the Dallas based church would have difficulty convincing local parishes that the Catholic pope is now misinformed and the new bigot really speaks for God

[–] pohart@programming.dev 8 points 10 months ago (2 children)

Is there a way to get notified when people respond to a some else's post?

[–] pohart@programming.dev 2 points 10 months ago

8 know i pay tradesman well, but I don't know how much they take home.

[–] pohart@programming.dev 99 points 10 months ago (5 children)

I once had to work with a government agency that insisted they generate and provide my private key.

[–] pohart@programming.dev 1 points 10 months ago

Forcing developers to think ahead about what data they actually need in advance also seems like a good thing maybe.

It does.

[–] pohart@programming.dev 2 points 10 months ago* (last edited 10 months ago)

I don't know .net and sometimes quite some janky code, but I think in this case I would preload everything I definitely needed, locking the records I'm modifying. Then use ConcurrentDictionary.GetOrAdd(Tkey,Func<...>) to load values I might need only when they're needed.

[–] pohart@programming.dev 2 points 10 months ago (2 children)

What language are you using? Is a good idea to limit db calls, but maybe we can help with specific techniques idiomatic to your language

[–] pohart@programming.dev 2 points 10 months ago* (last edited 10 months ago)

You're right that this could introduce regressions, but it sounds like it's making more testable.

My biggest concern would be introducing db contention with locks being held for too long, and introducing race conditions because the cached data isn't locking the records when they're cached.

Edit: your->you're

[–] pohart@programming.dev 2 points 10 months ago

Regardless of what pattern it is, you have a clear performance need and a testable implementation. That's a win.

Beyond looking for a pattern, I'd look at what your doing to make sure you're not loading a ton of extra dependencies of your know you won't use them.

Also, you generally want a database transacting to be one logical unit of work, that all commits or all rolls back together, if you're combining multiple transactions is likely what you want, but be aware that you might be holding locks for longer, so you might be introducing contention.

By the same token, make sure you've got records locked if you need them locked. If you had atomic updates before, or your first update locked the records you needed, you may need to lock records explicitly to keep your database consistent.

view more: ‹ prev next ›