Hacker Newsnew | past | comments | ask | show | jobs | submit | jpablo's commentslogin

  If you’re migrating a large MySQL database and you’re not 
  using mydumper/myloader, you’re doing it the hard way.
If you aren't using xtrabackup you are doing it wrong. I recently migrated a database with 2TB of data from 5.7 to 8.4 with about 15 seconds of down time. It wouldn't have been possible without xtrabackup. Mysqldumper requires a global write block, I wouldn't call blocking writes for hours a "zero downtime migration".

I have experience in migrating large DBs with replication and the article not discussing write blocks made my ears perk up as well.

Aside from the blocking you mentioned during the initial snapshot, you'd need to block writes to the old DB before the cutover as well. There's no way to guarantee in-flight writes to the old DB aren't lost when promoting the replica to a primary otherwise. I'm surprised the author didn't go into more detail here. Maybe it was fine given their workload, but the key issue I see is that they promoted the new DB to a primary before stopping the old application. During that gap, any data written to the old DB would be lost.


Correct me if I'm wrong, but done with a proxy in-between that can "pause" requests, you could have done the move with 0 seconds and no rejected requests, and I don't think mydumper/myloader/xtrabackup matters for that. The "migration" would be spinning up a new database, making it catch up, then switching over. If you can pause/hang in-flight requests while switching, not a single one needs to fail :)

The "making it catch up" is the tricky part. You need an initial backup for that. xtrabackup can take that backup "hot" without blocking read/writes. mysqldumper will block writes for whatever time that initial backup takes, for 2TB of data that's going to be hours.

Once you have that initial back up you can set your replica and make it catch up , then you switch. I choose to take the few seconds of downtime doing the switch because for my use case that was acceptable.


Isn't that just a flag? "--lock-tables=false", alternatively --single-transaction for InnoDB.

If you want a consistent backup that you can use to setup a replica you need to block writes while the backup is taken, take the backup while the database is shutdown OR use xtrabackup.

Thank you. I was confused that nobody pointed out that this "zero downtime migration" requires there to be no write to the original host for the time of the migration...


So basically VOIP?


Yeah... that's way, way, way more complex than npm run dev


NPM is absurdly complex in comparison, it's just neatly abstracted. Maybe somebody will write a cross-platform reactive layer which can compile both natively and to the web?


if i wrap a bunch of abstractions in a `make run` command whats the difference


Hot reloading is about the only difference if you're doing incremental builds.

For that, some languages are blocked by runtimes that don't support it. C can do it [0] so it's not a limitation of the static/dynamic divide.

[0] https://www.slembcke.net/blog/HotLoadC/


You will be surprised of The Unreasonable Effectiveness of opencv.calcOpticalFlowPyrLK


Which is a special case of mathematics.


The $100 is per year.


It is still disgusting. There is no need for that fee to be there, because remember, it sits on top of the purchase of at least $1,500 (a decent Mac).

I tried to see if I could make improvements to Immich. No can do, as half of their entitlements require a team account (and even then begging Apple to get the entitlements).

Now, they do offer a private account, so I spent time removing those entitlements. Guess what? Starting over 3 times and you're hit with a 'you can only sign 10 apps / week'.

Why do apps built for my iPhone, which I explicitly need to put in Developer mode, need to be signed by daddy Cook?


Apple can charge you that because they have a platform which is a monopoly.

Granted, they did the work that built and maintain the platform, but at some point it's actually the countless developers who contribute value, not Apple.


True. I completely forgot about that part. I absolutely love my windows PC, but I had to buy a mac so I can support cross platform


yeah. sorry my brain was on auto pilot.


What's wrong with email?


On a computer click click is a lot slower since you have to come to a complete pointer stop in your release. If your pointer is still moving in the release square most interfaces would detect that as some attempt to start a drag


On Lichess, this isn't the case; if I set my movement preference to 'click two squares', a click on a piece is registered immediately on mousedown regardless of cursor movement.

(When I set my movement preference to 'either', it's a bit harder to test, but I think a brief click-and-drag always counts as a click provided the mouseup happens within the initial square.)


This doesn’t make any sense. Click and click is slower than click+drag, it’s just obviously two extra movements (a full extra press and an extra release).

You can also drag and hover while waiting for the opponent move and release if the expected move shows up or right click to cancel the drag if not the expected move.

Also dragging and hovering over your target square is super useful to visualize your move and catch any last millisecond mistakes.

I do t think any of the top bullet/hyperbullet players does click and click. I think I have seen Magnus doing click and click in very old chess24 blitz videos but I’m not sure he did that in lichess playing bullet orin chesscom scc for example.


> Click and click is slower than click+drag, it’s just obviously two extra movements (a full extra press and an extra release).

From a pure physics standpoint, maybe, but humans aren't ideal physics actuators. Your muscles' ability to fire, your nerves' ability to fire, and your brain's ability to drive those (and also recover from each action) affects the dynamics.

In particular, your ability to precisely release heavily obstructs your hypothesis. There's a reason that sharpshooting guns still fire on trigger pull and not on trigger release.

Imagine a game where you need to precisely hit many targets quickly, and you can either click on a target or release a click on a target. You will be much more precise and quick only clicking even though you're doing "extra movements" releasing between each.


> Click and click is slower than click+drag, it’s just obviously two extra movements (a full extra press and an extra release).

I don't think this is right, because the second release is irrelevant (a click-click move happens on the second mousedown, not the second mouseup) and the first release can be done in parallel with the mouse movement. So really it is:

mousedown -> drag -> mouseup

vs.

mousedown -> (mouseup while moving) -> mousedown


mouseup has to occur before moving, or it initiates a drag


Not on Lichess. (I'm not sure about other platforms.)

With the click-to-move setting, the piece is activated on mousedown, and dragging is ignored.


Oh I see, I forgot there was a setting. I thought it was always either behaviour, depending on what you do.


I don't know for everyone but I think I can move a mouse faster and more accurately when not holding down the mouse button.


I never use a mouse, which probably makes a difference here: it's all via touchpad.


That seems massively relevant and should be in your post, assuming you're the author. Dragging on a touchpad is a nightmare for me: I would click and click with a touchpad, but would much prefer a mouse where I drag and drop. Click and click on a phone works great too.

(I'm playing at a significantly higher level than you, but nowhere near the elite players).


Not having the right click to cancel a drag would certainly be a huge difference


Everything is out in the open nowadays. Kids can start learning whatever they what an younger and younger ages.

A perfect example is chess. It used that a lot of knowledge was in books, often in foreign languages. Nowadays everything is out there in the open and additionally you can casually play games against top 100 opposition once you are okeish enough accelerating the development even more.


Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: