News for hackers. Stuff that matters.
Re:The Time I Lied to the CTO and Saved the Day by tangjurine on Wednesday May 08, 2024 @10:50PM (#40304828)
How about reading the entire Json document out of the database, making a copy of that document, updating the copy, and saving that copy to the database...

Is how someone on my old team designed an internal tool

Re:The Time I Lied to the CTO and Saved the Day by danielheath on Wednesday May 08, 2024 @10:57PM (#40304874)
Depending on load patterns, for an internal tool that might be perfectly reasonable; you can trivially look at the history, for one thing.
Re:The Time I Lied to the CTO and Saved the Day by Spivak on Wednesday May 08, 2024 @11:16PM (#40304989)
Is this not how you update a JSON column on a db that doesn't have (or you choose to not use for reasons) a native JSON type with a sprinkling of data should be immutable?
Re:The Time I Lied to the CTO and Saved the Day by dude187 on Thursday May 09, 2024 @12:00AM (#40305191)
Well without some form of locking you have a race condition. Two updates done at the same time can have the overwrite the other
Re:The Time I Lied to the CTO and Saved the Day by dikei on Thursday May 09, 2024 @06:16AM (#40306741)
One team in my company insists on storing everything related to a target in an MB-size Elasticsearch document and then do all the aggregation client-side, because they already use ES for everything else and don't know how to use a relational database.