Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete unused IP command - adding a limit, renaming the command #7491

Merged

Conversation

Projects
3 participants
@ondrejsibl
Copy link
Contributor

commented May 1, 2019

Please be sure you are submitting this against the staging branch.

Q A
Bug fix? N
New feature? Y
Automated tests included? N
Related user documentation PR URL N
Related developer documentation PR URL N
Issues addressed (#s or URLs)
BC breaks? N
Deprecations? N

Description:

New command mautic:unusedip:delete that executes a delete query to remove duplicate IP addresses from the database. Added a limit parameter to restrict the number of deleted rows, default value is 10000.

Steps to test this PR:

  1. Load up this PR
  2. Run mautic:unusedip:delete --limit 10000 command
  3. IP Addresses from ip_addresses table without references in any other table should be deleted
Delete unused IP command - adding a limit, renaming the command
# Conflicts:
#	app/bundles/CoreBundle/Entity/IpAddressRepository.php

@escopecz escopecz added this to the 2.15.2 milestone May 1, 2019

@escopecz

This comment has been minimized.

Copy link
Member

commented May 1, 2019

@npracht @kuzmany this must go to 2.15.2 as its previous version #7439 is there already. We renamed it to better suit what it does. But the main update is in the SQL query itself. When we run it on a bigger database it took very long and locked all tables in that command so Mautic was unusable. This PR fixes that.

@escopecz escopecz added this to Ready to Test (first time) in Mautic 2 May 1, 2019

@kuzmany kuzmany self-requested a review May 2, 2019

@escopecz escopecz moved this from Ready to Test (first time) to Ready to Test (confirmation) in Mautic 2 May 3, 2019

Mautic 2 automation moved this from Ready to Test (confirmation) to Ready to Test (first time) May 3, 2019

@kuzmany

kuzmany approved these changes May 3, 2019

@kuzmany

This comment has been minimized.

Copy link
Contributor

commented May 3, 2019

Tested and works properly with limitation

image

@npracht npracht moved this from Ready to Test (first time) to Ready to Commit (passed testing) in Mautic 2 May 3, 2019

@kuzmany kuzmany merged commit 623e0c8 into mautic:staging May 5, 2019

2 checks passed

Scrutinizer Analysis: 1 new issues, 4 updated code elements – Tests: passed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

Mautic 2 automation moved this from Ready to Commit (passed testing) to Merged May 5, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.