"What does this teach us? Well, it teaches me to do more diverse tests when doing destructive operations. It also should probably teach something to Vimeo and to my contractor but I doubt it will (and yes, the upload for some reason is still manual to this day. Go figure!)" So you wrote bad code, didn't test it properly, ran it on production on the Friday before a release and are blaming Vimeo and [name redacted]? An…
I Accidentally Deleted 7TB of Videos Before Going to Production
201–210 of 362 posts
Re: I Accidentally Deleted 7TB of Videos Before Going to Production
#202First, I want to say that this is a great post. You always grow stronger when you make mistakes. Writing it up solidify understanding in the learning process. This story resonates with many people here because many experienced engineers had done something similar before. For me, destructive batch operations like this would be two distinct steps: 1. Identify files that need to be deleted; 2. Loop through the list and…
> These steps are decoupled so that the list can be validated. Each step can be tested independently. And the scripts are idempotent and can be reused.
This is the most underrated comment.
I'm saying it as someone who had the ultimate oversight of deleting hundreds of TBs per day spread of billions of files on different clouds and local storage.
Re: I Accidentally Deleted 7TB of Videos Before Going to Production
#203What negativity and arrogance in the comments here. Jeez, it's like no one HN ever made a mistake, a bunch of 10xers ninja programmers here. Please read this: >I also want to preface this whole post by saying that I'm a Junior Developer with less than one year of actual experience. Some of the things that might seem obvious to some might not be so for me, thanks! It's just some kid sharing a mistake they made and own…
Re: I Accidentally Deleted 7TB of Videos Before Going to Production
#204Aaaahhh, the feeling you get when you notice that you fucked up. Everything gets quiet, body motion stops, cheeks get hot, heart starts to beat and sinks really low, "fuck, fuck, fuck, fuck, fuck, fuck, fuck, fuck, fuck, fucking shit". Pause. Wait. Think. "Backups, what do I have, how hard will it be to recover? What is lost?". Later you get up and walk in circles, fingers rolling the beard, building the plan in the…
Re: I Accidentally Deleted 7TB of Videos Before Going to Production
#205The root of this particular issue was Vimeo's failure to do this migration for their customers. Vimeo OTT has a codebase written in Rails, whereas the main PHP application is written in PHP. At the time Vimeo acquired Vimeo OTT's codebase, the Vimeo OTT codebase was small — around 10,000 lines of Ruby. Rewriting that codebase inside the Vimeo PHP application would have been a tough technical challenge for the all-Rub…
>The root of this particular issue was Vimeo's failure to do this migration for their customers. Yes and No. At the end of the day, you as a business have to insulate yourself from your infrastructure provider.
Re: I Accidentally Deleted 7TB of Videos Before Going to Production
#206Earlier quoted context omitted.
Don't fire for the mistake. Fire for the inability of someone to own it, cover it up, or point fingers at others.
His honesty of admitting to being off his nut while on-call led to his firing, not the action of deleting things.
This now my favorite euphemism for being high
Re: I Accidentally Deleted 7TB of Videos Before Going to Production
#207Earlier quoted context omitted.
> This stops accidentally copying a carriage return and executing the command. For a one-liner sure, but a multi line command can still be catastrophic. Showing the contents of the clipboard in the terminal itself (eg via xclip) or opening an editor and saving the contents to a file are usually better approaches. The latter let’s you craft the entire command in the editor and then run it as a script.
From [0]: [For Bash] Ctrl + x + Ctrl + e : launch editor defined by $EDITOR to input your command. Useful for multi-line commands. I have tested this on windows with a MINGW64 bash, it works similarly to how `git commit` works; by creating a new temporary file and detecting* when you close the editor. [0] https://github.com/onceupon/Bash-Oneliner * Actually I have no idea how this works; does bash wait for the child…
Once that happens, it reads from the temporary file that it created.
Re: I Accidentally Deleted 7TB of Videos Before Going to Production
#208I am also a junior dev and completely empathize with being given a lot of responsibility and potentially messing up. I think for someone with < 1 year of experience, to solve the problems you created as fast as you did is really impressive. Thankfully your story ends well :)
Re: I Accidentally Deleted 7TB of Videos Before Going to Production
#209Hey, everyone, ease up. I have: 1) dropped a production database because I thought it was the test database. 2) screwed up a print job costing $100,000 in today’s money and had to do it again 3) crashed all of Facebook with a C++ bug. 4) crashed Facebook photo uploads, with a JavaScript bug, in my first month. 5) literally killed a startup’s cash flow and caused them to lose their merchant account because I over focu…
In my defence, we had to get 2 PR approvals before anything was merged! But I definitely learned a thing or two from that experience
Re: I Accidentally Deleted 7TB of Videos Before Going to Production
#210So: I never feed the data straight from the gathering script into the modifying script, at least not in the first runs. Instead, I dump the whole list of items into a file, count them in there, gawk at them to see that they're right, and compare with the source data by hand until I begin to annoy myself. Then I feed that file to the second script.