Fixed reduce by key for amp size limit