The initial stages of planet formation are slowed down in a turbulent disk. In particular, the growth rate of 10-100 km-sized planetesimals into larger bodies by accreting mm- to cm-sized solid particles through aerodynamic drags, the so-called pebble accretion, is sensitive to the level of turbulence. I have recently shown that spiral waves in accretion disks, driven for instance by Jupiter in proto-solar nebula, can (partially) dissipate by an instability and significantly enhance the level of turbulence in the disk. This spiral wave instability (SWI) arises as inertial modes, natural oscillations in rotating systems, amplify as they resonantly couple with and extract energy from the background spiral waves. In this talk, I will discuss the consequence of the SWI operating on the spiral waves driven by a Jupiter-mass planet in a protoplanetary disk. Numerical simulations show that the vertical diffusion rate induced by the SWI is such that particles with sizes up to several centimeters can be vertically dispersed to the first pressure scale height. This significant particle stirring can thus add a time constraint to terrestrial body formation: if accretion of pebbles dominates formation of terrestrial bodies, terrestrial bodies have to finish accreting pebbles before a gas giant has formed in the outer disk, otherwise the strong turbulence driven by the gas giant will significantly drop pebble accretion efficiency.