Tsunami

This is a rare event that happens with a 0.45% chance only when you are in the ocean biome. it spawns a huge wave of water that reaches to space, and then it advances over the land, flooding everything until the wave is demolished. It can be skipped with a Enchanted Sundial.

Even if you have a neptune's shell, the wave will drench a good quarter (at the most) of your world so a large wall over your sea is a good idea. Also you can make a hole however it would have to be massive to stop the wave completely.