News for hackers. Stuff that matters.
Re:Soft deletion probably isn't worth it by giantg2 on Tuesday July 19, 2022 @02:57PM (#32156289)
"The concept behind soft deletion is to make deletion safer, and reversible."

That's one part. The other part is that in many industries you have regulatory data retention and audit requirements. This is arguably the most valuable and common reason to perform Logical deletes.

Re:Soft deletion probably isn't worth it by brtkdotse on Tuesday July 19, 2022 @03:06PM (#32156420)
In banking and bookkeeping, there’s no such thing as a “delete”. Once something is in the ledger you can’t undo it - you have to make a new entry that negates the old one.
Re:Soft deletion probably isn't worth it by munk-a on Tuesday July 19, 2022 @03:58PM (#32157120)
Yes, but banks tend to have websites with accounts and those accounts need to be deactivated when a customer should no longer have access (or, even more finicky, specific accounts for a client need to be deactivated or activated as they change their usage).

All this essentially forces the use of some sort of soft deletion. (Activation flags are sort of just a more complicated form of soft deletion).

Re:Soft deletion probably isn't worth it by AdrianB1 on Tuesday July 19, 2022 @06:09PM (#32158623)
Status (active/inactive/other) and existence (present or deleted) are very different things, they may be separated most of the time. Legal requirements can prevent deletion of inactive data, so in some cases one may have a lot of inactive but must keep data. Soft delete can help in some scenarios, for example you want to give people a way to re-activate accounts, but hide the ones marked as deleted.
Re:Soft deletion probably isn't worth it by i_hate_pigeons on Tuesday July 19, 2022 @03:15PM (#32156561)
not every thing is a transaction though, say a deleted piece of ref data that still has FKs to other stuff etc
Re:Soft deletion probably isn't worth it by Hallucinaut on Tuesday July 19, 2022 @03:29PM (#32156731)
These are still versioned in many serious finance systems
Re:Soft deletion probably isn't worth it by hammock on Tuesday July 19, 2022 @03:09PM (#32156458)
Is the same true in mass surveillance?
Re:Soft deletion probably isn't worth it by m-p-3 on Tuesday July 19, 2022 @03:14PM (#32156542)
and the blockchain.
Re:Soft deletion probably isn't worth it by tomrod on Tuesday July 19, 2022 @03:29PM (#32156729)
Which is a decentralized, distributed ledger, so... banking! :)
Re:Soft deletion probably isn't worth it by hnbad on Wednesday July 20, 2022 @05:08AM (#32163207)
By that definition the tally marks on my beer mat are banking, too.
Re:Soft deletion probably isn't worth it by cweagans on Tuesday July 19, 2022 @04:29PM (#32157523)
"banking"
Re:Soft deletion probably isn't worth it by jewayne on Tuesday July 19, 2022 @03:01PM (#32156351)
I would argue that in many cases the concept behind soft deletion is to make deletion permanent.

Hard deletes retain no memory of what you wanted to be gone, so any malfunctioning sync process will continuously recreate the deleted record soon after it's deleted. Soft deletes are often the only way to make sure deleted records don't reappear.

Re:Soft deletion probably isn't worth it by eeperson on Tuesday July 19, 2022 @03:10PM (#32156478)
Couldn't a malfunctioning sync process undo a soft delete as well?
Re:Soft deletion probably isn't worth it by jayd16 on Tuesday July 19, 2022 @03:43PM (#32156934)
Null is more ambiguous than an explicit conflict. If there is literally no record, even of the delete action then there's no timestamp for last write wins.
Re:Soft deletion probably isn't worth it by trinovantes on Tuesday July 19, 2022 @03:25PM (#32156679)
Assuming you're using a modern database, replication is done with paxos/raft and they are formally proven to not allow this to happen as both edits/deletions are both just entries in distributed event log.
Re:Soft deletion probably isn't worth it by nirvdrum on Tuesday July 19, 2022 @03:49PM (#32156992)
My experience at a few start-ups has been that account deletion just isn't prioritized. It's not a focus when building an MVP. If the application ever gains traction, everyone is then terrified they'll accidentally delete customer data that they never delete anything. It's a shame. As a user, when I delete my account or data in my account, I want you to permanently delete it, not keep it around and just make inaccessible to me.
Re:Soft deletion probably isn't worth it by jrockway on Tuesday July 19, 2022 @04:03PM (#32157183)
If it makes you feel better, the startups that don't have time to delete your data probably don't have a viable disaster recovery plan either.

As we learned from the Atlassian snafu, even giant companies with billions in revenue often can't recover from disasters. (I try to test mine every 6 months. I've never had a test go perfectly.)

Re:Soft deletion probably isn't worth it by tomcam on Tuesday July 19, 2022 @04:40PM (#32157660)
Good to know. What do you were tests look like?
Re:Soft deletion probably isn't worth it by nerdponx on Tuesday July 19, 2022 @04:19PM (#32157388)
I've also seen businesses retain "deleted" data in order to support legitimate data analysis work in the future. And it actually can help significantly. Maybe scrubbing PII from deleted accounts is a good idea, but those deleted accounts are perfectly good data points, especially in smaller/newer companies with lower-volume data streams.
Re:Soft deletion probably isn't worth it by nirvdrum on Tuesday July 19, 2022 @05:33PM (#32158274)
If you want to retain anonymous statistics, fine. I'm not keen on you retaining my actual data so you can monetize it after our business relationship has concluded. The biggest thing a small team can learn is why they failed to retain a customer or a trial that didn't convert. For that, usage metrics are considerably more valuable than user data.
Re:Soft deletion probably isn't worth it by dubswithus on Wednesday July 20, 2022 @10:25AM (#32166220)
The business owns your data. Why would they delete it if they don't have to?
Re:Soft deletion probably isn't worth it by silisili on Tuesday July 19, 2022 @03:03PM (#32156376)
Why not just use an audit table, to keep from littering your indices?
Re:Soft deletion probably isn't worth it by jelkand on Tuesday July 19, 2022 @03:11PM (#32156502)
An audit table is a similar, but not entirely equivalent tool. There are circumstance where both audit tables / soft deletes are appropriate, and where only one of the two is. Other systems that work are append-only tables, event driven systems, and I'm sure there are more that I'm not aware of.
Re:Soft deletion probably isn't worth it by jacobr1 on Tuesday July 19, 2022 @03:06PM (#32156423)
You still need a record of the data, which probably isn't fully captured in the audit table
Re:Soft deletion probably isn't worth it by MonkeyMalarky on Tuesday July 19, 2022 @03:40PM (#32156891)
Then there's always the joy of a situation where your client is being sued by one of their clients and now needs your help recovering everything possible from your platform. And you're going to help them because you'd like to keep them as a client rather than let them be sued into oblivion.
Re:Soft deletion probably isn't worth it by jiggywiggy on Tuesday July 19, 2022 @03:26PM (#32156697)
Ha, and then there is the opposite regulation that you have to delete user data.
Re:Soft deletion probably isn't worth it by MonkeyMalarky on Tuesday July 19, 2022 @03:35PM (#32156830)
Well you see, you need a complete record of when it was created, every change that occurred, everyone who could view it and also log every access attempt. But it. You're not actually supposed to keep it. Just everything surrounding it.
Re:Soft deletion probably isn't worth it by scott_w on Tuesday July 19, 2022 @04:57PM (#32157872)
Not quite. GDPR (and equivalents) have clear escape hatches to allow you to store data if you have good reason (even if the data subject requests its removal).

Invoices, from the article, is a great example. That record must remain unchanged in most financial regulations. I’d wager a customer sending a deletion request for invoices will be met with raucous laughter from the legal and finance teams.

Re:Soft deletion probably isn't worth it by giantg2 on Tuesday July 19, 2022 @05:13PM (#32158067)
In some industries the retention regulations trump the deletion ones. I believe finance is one area where they will delete some of your data, but are still required to maintain 7 years of specifically listed data.
Re:Soft deletion probably isn't worth it by taeric on Tuesday July 19, 2022 @05:24PM (#32158188)
This is almost certainly going to bite you if you don't push all customer identification data out of your main data stores.

And it will go a long way to making your services harder to use if you don't allow users to associate friendly names with things. And to assume that the same friendly name will be used for a future item. (For example, if you name devices based on the room you put them in. Is reasonable to think that when you replace a device, that you are likely to want to reuse the name.)

Re:Soft deletion probably isn't worth it by necovek on Tuesday July 19, 2022 @05:19PM (#32158126)
And yet another part is making deletes (appear) instantaneous: useful when it involves cleaning up a bunch of "related" data possibly living on different services (eg. S3, ES...).

This also helps with the original goal of making them safer by manually implementing "eventual consistency" for data living outside the transactional world.

Re:Soft deletion probably isn't worth it by taeric on Tuesday July 19, 2022 @05:26PM (#32158200)
Don't make deletes appear instantaneous? If you have heavy weight systems, then it makes sense for provisioning and deleting entities is a process, that should be open to monitoring.
Re:Soft deletion probably isn't worth it by necovek on Tuesday July 19, 2022 @07:01PM (#32159096)
Exposing details of long lived background processes, and especially deletion processes to users (who in many cases couldn't care less) is a lot of work that's probably not worth it for the rare "hey, something went wrong" case — it's usually perfectly acceptable to raise that with the support team and let them use internal tools to debug and investigate.

I am sure there are cases where it is worthwhile, but most of the times I've hit this in common web apps, it wasn't.

Re:Soft deletion probably isn't worth it by taeric on Tuesday July 19, 2022 @07:28PM (#32159313)
I disagree. Any system that doesn't transition an entity to "deleting" is almost certainly going to be a pain point for me when I go to delete something.

This can be seen as related to soft deletes. But I consider it more marking intent in the system. Lets you make "delete" a simple field update that will be carried out by the backend.

Re:Soft deletion probably isn't worth it by necovek on Wednesday July 20, 2022 @04:10AM (#32162860)
Say you are attempting to delete a tweet you made: you click on the delete button, and you want to see that your tweet is in the process of being deleted, but not really deleted yet (as the platform goes and updates all the retweet references and such)?

Really? What value do you as a user get from knowing the details of this transitory state? Do you also want to see a progress bar of how many references have been updated, what's the progress of evicting the tweet from search indexes, etc? What's wrong with all this appearing instantaneous and actual delete happening in the background over 5 minutes or 5 hours?

It seems you are in favour of this approach, just don't want to call it "soft delete" (since it may be followed by a hard out-of-band delete).

Re:Soft deletion probably isn't worth it by taeric on Wednesday July 20, 2022 @02:53PM (#32170460)
I'd rather see acknowledgement that it is having to do more work, than be surprised when it still shows up on another timeline for a bit longer.

I don't necessarily care on a progress bar, as those typically have their own woes.

And don't get me wrong, there are easy deletion cases that I am ok with appearing to happen immediately. I just find hiding processes from me is usually more annoying than it is worth. Worse, when the implementation didn't do it as a process, and now they typically just have more edge cases that won't delete cleanly.

Re:Soft deletion probably isn't worth it by necovek on Friday July 22, 2022 @01:33AM (#32188863)
What you missed from my original post is that it is a lot of effort to expose transitory state: nobody is going the extra mile to annoy you, they are just not investing in implementing extra UI to expose it.

And in most cases, it's the right balance.

Re:Soft deletion probably isn't worth it by taeric on Friday July 22, 2022 @02:58PM (#32195817)
From my experience, most places don't model the transition state. Such that it easily gets bunged.

If you just want to make it hidden, that is fine. But can lead to it's own problems. Usually when you have uniqueness constraints on things.

Re:Soft deletion probably isn't worth it by dexwiz on Tuesday July 19, 2022 @02:59PM (#32156322)
I think billions have been spent bridging the gap between “ideal” software and what businesses actually need. Access control is another thing I see developers wanting to simplify or push to implement later, but is actually a key feature.
Re:Soft deletion probably isn't worth it by dubswithus on Wednesday July 20, 2022 @10:24AM (#32166194)
There's definitely perfect and perfect for the business. But when large companies have many developers they all have to do something. They will spend their time doing something unnecessary.
Re:Soft deletion probably isn't worth it by yen223 on Tuesday July 19, 2022 @07:50PM (#32159498)
Nowadays, regulations goes both ways. Data sovereignty regulations and GDPR-like laws can mandate that data must get hard-deleted.