I'll hit two birds with one stone here ...
First note that John Miller's note refers to an "electrolysis like" action. This refers to a mechanism similar to spark erosion. It does not indicate that the pitting caused by cavitation is due to spark erosion - just that it produces similar results.
Second, with regard to my comments about erosion due to jetting ... I'll give a brief description, but you won't find much (if anything) in the public domain on it. You could try a search on 'bubble micro-jetting cavitation' to see what comes up but it won't be very much. The military is very familiar with this concept.
Basically, cavitation occurs at areas of low pressure within a liquid. The low-pressure allows microscopic bubbles to form of the vapor phase of the liquid.
When a shock-wave in the liquid impinges on these bubbles the bubble can collapse asymetrically. Not to trivialize, but the bubble first starts to look like a kidney shape as the shock-wave hits it - then as the shock-wave passes over/through it it starts to look more like a pac-man profile. The 'mouth' of the pacman would be at the opposite side to where the shock-wave hits the bubble first.
Now imagine what happens to the liquid caught in the 'pacman' shaped bubble's 'mouth'. The bubble collapse forces the liquid to accelerate to extremely high speeds - typically supersonic. This creates an effect known as jetting or micro-jetting (on this small scale).
The jet reaches extremely high speeds. When the bubble collapses in close proximity to the cylinder wall, the jet will impact the cylinder before it has lost any energy. The energy in the jet is such that it will hydrodynamically penetrate the material in the cylinder wall.
This is not melting or abrasion. The momentum of the jet is high enough that the target material simply flows away from the point of impact. This results (for a micro-jet) in a little pit on the target. Materials behave very differently under these high strain-rate / shock-wave conditions than they do normally. The effect is literally like aiming a high-pressure water-jet at a mud bank.
The end result looks similar to spark erosion, but under microscopic examination they look quite different. Spark erosion produces localized melting and other thermal effects. Micro-jetting does not.
This jetting mechanism is similar to that used for armor piercing munitions by the military - hence their interest.
Patrick