Live data from Hacker News

This Message Does Not Exist

kmjn.org

81–90 of 278 posts

Re: This Message Does Not Exist

#81
post #46

Earlier quoted context omitted.

It's still funny that the text of a message can exist without being a message itself. That must make sense in the specific context of Outlook, but it shows that the conceptual design of the software does not match how we want to think about the domain abstractly.

I don’t think the model is that far off. In real life I can read a letter and retain the contents in my mind, then burn the letter.

This letter cannot be read because it has been burnt to ash. You can only throw away the ashes. Make sure you read the letter and retain the contents in your mind, before you throw away the ashes, if you want to use them later.

Re: This Message Does Not Exist

#83

Earlier quoted context omitted.

Oh that's interesting, and probably manifests a bunch of issues related to storage and rollback segments being consumed with the transaction staying open for months. But that's not the same thing as rollback failing (although it is the invocation of rollback failing) as neither rollback nor commit was fully issued and received, so it makes sense that the transaction would stay open (given that the database doesn't ti…

Yeah, the story is a bit incomplete. The full chain was application->transaction master -> 20 or so slave databases. It was a weekly batch dispatching data to the 20 slaves, starting with a full delete of each slave. Someone decided to literally pull the plug and replace the master database server node from the rack, while the batch was still running. He assumed the other server nodes would pick up where this one lef…

How did you discover the dangling transaction?

Re: This Message Does Not Exist

#85
Everyone is snickering at this and talking about philosophy, but there is actually a legitimate point being made here, albeit obliquely: how do you explain to a non-technical user that their data has been deleted on the server, but that their client still has a cached copy that they might want to try to salvage somehow? I submit that this is a nontrivial problem worthy of serious consideration.

Re: This Message Does Not Exist

#86

Earlier quoted context omitted.

Falsehoods programmers believe: - Sleep(1) sleeps for exactly 1 second. - Sleep(1) sleeps for approximately 1 second. - Sleep(1) sleeps for at least 1 second. - Sleep(1) sleeps for an unknown, but short amount of time. Certainly not weeks, months or years.

> Sleep(1) sleeps for approximately 1 second. This is correct - Sleep(1) does sleep for approximately 1 second; the problem is you're confusing the 95% confidence interval (which might be as narrow as (999ms,1001ms) for some reasonable designs) with the absolute error bounds (which are (0ms,∞ms], and yes, the infinity end is inclusive).

If your software is running on a VM, and that VM is suspended (e.g. for migration), the end of sleep could be minutes or months in future.

This is surprisingly common when running on certain VM instance types on public cloud! Common enough that I've had to account for it in production code.

Re: This Message Does Not Exist

#88
post #85

Everyone is snickering at this and talking about philosophy, but there is actually a legitimate point being made here, albeit obliquely: how do you explain to a non-technical user that their data has been deleted on the server, but that their client still has a cached copy that they might want to try to salvage somehow? I submit that this is a nontrivial problem worthy of serious consideration.

I find most apps give up an enumerating the possibly modes of consistency violation that can occur in an app. I’ve tried and failed to do it “right” before and it’s incredibly difficult.

Re: This Message Does Not Exist

#89
post #6

I've had similar philosophical thoughts about a transaction rollback. Consider this definition from go's database/sql package. func (tx *Tx) Rollback() error Rollback can fail, indicated as such by it can return an error. What are the cases where rollback could fail and what's the recovery mechanism? Does a failed rollback mean (logically) that the transaction is still open and uncommitted? But really, invoking rollb…

Or the Java SQL connection interface, that can throw SQLException on close(). Yes, if your connection throws an error when closing, I guess it stops being usable. Has anybody ever did something useful with that exception?

Depending on the durability guarantees of the database/connection in question and whether it uses request pipelining, I could imagine it indicating something like "non-clean connection shutdown; your last few commands might not have been processed"?

There's a similar situation in raw socket programming in some OSes: You might be done writing all your outbound data into the socket (i.e. your last write() call returned indicating success), but the receiving application might crash before being able to read all of your data.

By implementing an application-level shutdown command that the other side acknowledges, that can be avoided; maybe some SQL protocol implementations do that, and that exception is thrown if the shutdown request is never acknowledged.

Re: This Message Does Not Exist

#90
post #85

Everyone is snickering at this and talking about philosophy, but there is actually a legitimate point being made here, albeit obliquely: how do you explain to a non-technical user that their data has been deleted on the server, but that their client still has a cached copy that they might want to try to salvage somehow? I submit that this is a nontrivial problem worthy of serious consideration.

Maybe pose it as a question to the user, rather than an error message: “This message has been deleted from the server. Do you want to:

- discard it permanently - store this version on the server - save as a file to your computer”

Post reply on HN