Leonardo is generally credited with inventing this aspect of the modern lock, a door withing the larger gate for releasing water pressure.
This detail, found in the Atlantic Codex, refers to the lock at Conca dell'Incoronata near the northeast wall of Milan.