1

I've got a store that is suffering performance issues. And I've been able to pinpoint this to MSI. I started to seriously look at this today.

How do you upgrade MSI on Magento 2.3?

I've read help docs and I'm more confused

https://github.com/magento/inventory/wiki/Known-Performance-Issues

Lists some patches are part of 1.1.3

Price indexer fails on installations with large catalogs PR #2336 1.1.3

Large response times for Catalog-related scenarios on websites running default source and stock combination on storefront and admin PR #2350 1.1.3

Large number of duplicate database queries on Checkout-related scenarios on storefront Commit ad57569 Next

Multiple redundant SHOW TABLES queries in Catalog and Checkout related scenarios PR #2561 Next

https://github.com/magento/inventory/tags

1.1.3 is not tagged (Nov 2019)

Also here

https://devdocs.magento.com/release/

Magento Inventory 1.6.1 is listed as General Availability under 2.3.0

Anyone had any success upgrading via magento/inventory-composer-metapackage?

Got that from here https://devdocs.magento.com/extensions/inventory-management/

Which has this caveat

This page may include updates for Inventory Management (MSI) 1.1.2 Beta. Content is subject to change. 

at the top. facepalm

Had anyone been able to upgrade? Can you upgrade MSI without upgrading Mage core?

Or is direct patch route better? e.g.

https://patch-diff.githubusercontent.com/raw/magento/inventory/pull/2336.patch

https://patch-diff.githubusercontent.com/raw/magento/inventory/pull/2350.patch

https://github.com/magento/inventory/commit/ad57569792551b58d22e169ed536da4ac22a0f2d.patch

https://patch-diff.githubusercontent.com/raw/magento/inventory/pull/2561.patch

in order of wiki post

Update

As per https://devdocs.magento.com/guides/v2.3/comp-mgr/patching.html

composer require cweagans/composer-patches

patches/composer/2336.patch

patches/composer/2350.patch

Tried composer but nope!

    "extra": {
        "magento-force": "override",
        "composer-exit-on-patch-failure": true,
        "patches": {
            "magento/module-inventory": {
                "MSI-2210: Price Indexer fails with large catalogs": "patches/composer/2336.patch",
                "Avoid querying inventory default stock view in storefront": "patches/composer/2350.patch"
            }
        }
    }
➜  Mage230 composer -v install
Gathering patches for root package.
Removing package magento/module-inventory so that it can be re-installed and re-patched.
  - Removing magento/module-inventory (1.0.3)
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.
Dependency resolution completed in 0.007 seconds
Analyzed 843 packages to resolve dependencies
Analyzed 5470 rules to resolve dependencies
Package operations: 1 install, 0 updates, 0 removals
Installs: magento/module-inventory:1.0.3
Gathering patches for root package.
Gathering patches for dependencies. This might take a minute.
Found 2 patches for magento/module-inventory.
  - Installing magento/module-inventory (1.0.3): Downloading (100%)         
 Extracting archive  - Applying patches for magento/module-inventory
    patches/composer/2336.patch (MSI-2210: Price Indexer fails with large catalogs)
patch '-p1' --no-backup-if-mismatch -d '/home/dominic/Git/Mage230/vendor/magento/module-inventory' < '/home/dominic/Git/Mage230/patches/composer/2336.patch'
can't find file to patch at input line 14
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|From 62644e2b3f70e16152900c96eef290c9e54085e9 Mon Sep 17 00:00:00 2001
|From: Stepan Furman <furman.stepan@gmail.com>
|Date: Tue, 18 Jun 2019 10:52:22 +0300
|Subject: [PATCH 1/3] MSI-2210: Price Indexer fails with large catalogs
|
|---
| .../ModifySelectInProductPriceIndexFilter.php | 37 ++++++++++++++++++-
| 1 file changed, 35 insertions(+), 2 deletions(-)
|
|diff --git a/app/code/Magento/InventoryCatalog/Plugin/CatalogInventory/Model/Indexer/ModifySelectInProductPriceIndexFilter.php b/app/code/Magento/InventoryCatalog/Plugin/CatalogInventory/Model/Indexer/ModifySelectInProductPriceIndexFilter.php
|index ff3fbe109f9..04b1400ead6 100644
|--- a/app/code/Magento/InventoryCatalog/Plugin/CatalogInventory/Model/Indexer/ModifySelectInProductPriceIndexFilter.php
|+++ b/app/code/Magento/InventoryCatalog/Plugin/CatalogInventory/Model/Indexer/ModifySelectInProductPriceIndexFilter.php
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.

5 out of 5 hunks ignored

can't find file to patch at input line 113
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|
|From b8180cd196d521e361a181559df3a184a2787bb4 Mon Sep 17 00:00:00 2001
|From: Stepan Furman <furman.stepan@gmail.com>
|Date: Sat, 22 Jun 2019 13:10:41 +0300
|Subject: [PATCH 2/3] MSI-2210: get rid of redundant website_id predicate
|
|---
| .../Model/Indexer/ModifySelectInProductPriceIndexFilter.php  | 5 ++---
| 1 file changed, 2 insertions(+), 3 deletions(-)
|
|diff --git a/app/code/Magento/InventoryCatalog/Plugin/CatalogInventory/Model/Indexer/ModifySelectInProductPriceIndexFilter.php b/app/code/Magento/InventoryCatalog/Plugin/CatalogInventory/Model/Indexer/ModifySelectInProductPriceIndexFilter.php
|index 04b1400ead6..1b249c2a559 100644
|--- a/app/code/Magento/InventoryCatalog/Plugin/CatalogInventory/Model/Indexer/ModifySelectInProductPriceIndexFilter.php
|+++ b/app/code/Magento/InventoryCatalog/Plugin/CatalogInventory/Model/Indexer/ModifySelectInProductPriceIndexFilter.php
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.

1 out of 1 hunk ignored

can't find file to patch at input line 139
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|
|From 1081bbb03d086608b6bf8633b3442408fe29f8df Mon Sep 17 00:00:00 2001
|From: Stepan Furman <furman.stepan@gmail.com>
|Date: Sat, 22 Jun 2019 13:46:22 +0300
|Subject: [PATCH 3/3] MSI-2210: fix static test
|
|---
| .../Model/Indexer/ModifySelectInProductPriceIndexFilter.php    | 3 ++-
| 1 file changed, 2 insertions(+), 1 deletion(-)
|
|diff --git a/app/code/Magento/InventoryCatalog/Plugin/CatalogInventory/Model/Indexer/ModifySelectInProductPriceIndexFilter.php b/app/code/Magento/InventoryCatalog/Plugin/CatalogInventory/Model/Indexer/ModifySelectInProductPriceIndexFilter.php
|index 1b249c2a559..1ed6e157aa8 100644
|--- a/app/code/Magento/InventoryCatalog/Plugin/CatalogInventory/Model/Indexer/ModifySelectInProductPriceIndexFilter.php
|+++ b/app/code/Magento/InventoryCatalog/Plugin/CatalogInventory/Model/Indexer/ModifySelectInProductPriceIndexFilter.php
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.

1 out of 1 hunk ignored

patch '-p0' --no-backup-if-mismatch -d '/home/dominic/Git/Mage230/vendor/magento/module-inventory' < '/home/dominic/Git/Mage230/patches/composer/2336.patch'
can't find file to patch at input line 14
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|From 62644e2b3f70e16152900c96eef290c9e54085e9 Mon Sep 17 00:00:00 2001
|From: Stepan Furman <furman.stepan@gmail.com>
|Date: Tue, 18 Jun 2019 10:52:22 +0300
|Subject: [PATCH 1/3] MSI-2210: Price Indexer fails with large catalogs
|
|---
| .../ModifySelectInProductPriceIndexFilter.php | 37 ++++++++++++++++++-
| 1 file changed, 35 insertions(+), 2 deletions(-)
|
|diff --git a/app/code/Magento/InventoryCatalog/Plugin/CatalogInventory/Model/Indexer/ModifySelectInProductPriceIndexFilter.php b/app/code/Magento/InventoryCatalog/Plugin/CatalogInventory/Model/Indexer/ModifySelectInProductPriceIndexFilter.php
|index ff3fbe109f9..04b1400ead6 100644
|--- a/app/code/Magento/InventoryCatalog/Plugin/CatalogInventory/Model/Indexer/ModifySelectInProductPriceIndexFilter.php
|+++ b/app/code/Magento/InventoryCatalog/Plugin/CatalogInventory/Model/Indexer/ModifySelectInProductPriceIndexFilter.php
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.

5 out of 5 hunks ignored
can't find file to patch at input line 113
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------

|
|From b8180cd196d521e361a181559df3a184a2787bb4 Mon Sep 17 00:00:00 2001
|From: Stepan Furman <furman.stepan@gmail.com>
|Date: Sat, 22 Jun 2019 13:10:41 +0300
|Subject: [PATCH 2/3] MSI-2210: get rid of redundant website_id predicate
|
|---
| .../Model/Indexer/ModifySelectInProductPriceIndexFilter.php  | 5 ++---
| 1 file changed, 2 insertions(+), 3 deletions(-)
|
|diff --git a/app/code/Magento/InventoryCatalog/Plugin/CatalogInventory/Model/Indexer/ModifySelectInProductPriceIndexFilter.php b/app/code/Magento/InventoryCatalog/Plugin/CatalogInventory/Model/Indexer/ModifySelectInProductPriceIndexFilter.php
|index 04b1400ead6..1b249c2a559 100644
|--- a/app/code/Magento/InventoryCatalog/Plugin/CatalogInventory/Model/Indexer/ModifySelectInProductPriceIndexFilter.php
|+++ b/app/code/Magento/InventoryCatalog/Plugin/CatalogInventory/Model/Indexer/ModifySelectInProductPriceIndexFilter.php
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.

1 out of 1 hunk ignored

can't find file to patch at input line 139
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|
|From 1081bbb03d086608b6bf8633b3442408fe29f8df Mon Sep 17 00:00:00 2001
|From: Stepan Furman <furman.stepan@gmail.com>
|Date: Sat, 22 Jun 2019 13:46:22 +0300
|Subject: [PATCH 3/3] MSI-2210: fix static test
|
|---
| .../Model/Indexer/ModifySelectInProductPriceIndexFilter.php    | 3 ++-
| 1 file changed, 2 insertions(+), 1 deletion(-)
|
|diff --git a/app/code/Magento/InventoryCatalog/Plugin/CatalogInventory/Model/Indexer/ModifySelectInProductPriceIndexFilter.php b/app/code/Magento/InventoryCatalog/Plugin/CatalogInventory/Model/Indexer/ModifySelectInProductPriceIndexFilter.php
|index 1b249c2a559..1ed6e157aa8 100644
|--- a/app/code/Magento/InventoryCatalog/Plugin/CatalogInventory/Model/Indexer/ModifySelectInProductPriceIndexFilter.php
|+++ b/app/code/Magento/InventoryCatalog/Plugin/CatalogInventory/Model/Indexer/ModifySelectInProductPriceIndexFilter.php
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.

1 out of 1 hunk ignored

patch '-p2' --no-backup-if-mismatch -d '/home/dominic/Git/Mage230/vendor/magento/module-inventory' < '/home/dominic/Git/Mage230/patches/composer/2336.patch'
can't find file to patch at input line 14
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|From 62644e2b3f70e16152900c96eef290c9e54085e9 Mon Sep 17 00:00:00 2001
|From: Stepan Furman <furman.stepan@gmail.com>
|Date: Tue, 18 Jun 2019 10:52:22 +0300
|Subject: [PATCH 1/3] MSI-2210: Price Indexer fails with large catalogs
|
|---
| .../ModifySelectInProductPriceIndexFilter.php | 37 ++++++++++++++++++-
| 1 file changed, 35 insertions(+), 2 deletions(-)
|
|diff --git a/app/code/Magento/InventoryCatalog/Plugin/CatalogInventory/Model/Indexer/ModifySelectInProductPriceIndexFilter.php b/app/code/Magento/InventoryCatalog/Plugin/CatalogInventory/Model/Indexer/ModifySelectInProductPriceIndexFilter.php
|index ff3fbe109f9..04b1400ead6 100644
|--- a/app/code/Magento/InventoryCatalog/Plugin/CatalogInventory/Model/Indexer/ModifySelectInProductPriceIndexFilter.php
|+++ b/app/code/Magento/InventoryCatalog/Plugin/CatalogInventory/Model/Indexer/ModifySelectInProductPriceIndexFilter.php
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.

5 out of 5 hunks ignored

can't find file to patch at input line 113
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|
|From b8180cd196d521e361a181559df3a184a2787bb4 Mon Sep 17 00:00:00 2001
|From: Stepan Furman <furman.stepan@gmail.com>
|Date: Sat, 22 Jun 2019 13:10:41 +0300
|Subject: [PATCH 2/3] MSI-2210: get rid of redundant website_id predicate
|
|---
| .../Model/Indexer/ModifySelectInProductPriceIndexFilter.php  | 5 ++---
| 1 file changed, 2 insertions(+), 3 deletions(-)
|
|diff --git a/app/code/Magento/InventoryCatalog/Plugin/CatalogInventory/Model/Indexer/ModifySelectInProductPriceIndexFilter.php b/app/code/Magento/InventoryCatalog/Plugin/CatalogInventory/Model/Indexer/ModifySelectInProductPriceIndexFilter.php
|index 04b1400ead6..1b249c2a559 100644
|--- a/app/code/Magento/InventoryCatalog/Plugin/CatalogInventory/Model/Indexer/ModifySelectInProductPriceIndexFilter.php
|+++ b/app/code/Magento/InventoryCatalog/Plugin/CatalogInventory/Model/Indexer/ModifySelectInProductPriceIndexFilter.php
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.

1 out of 1 hunk ignored

can't find file to patch at input line 139
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|
|From 1081bbb03d086608b6bf8633b3442408fe29f8df Mon Sep 17 00:00:00 2001
|From: Stepan Furman <furman.stepan@gmail.com>
|Date: Sat, 22 Jun 2019 13:46:22 +0300
|Subject: [PATCH 3/3] MSI-2210: fix static test
|
|---
| .../Model/Indexer/ModifySelectInProductPriceIndexFilter.php    | 3 ++-
| 1 file changed, 2 insertions(+), 1 deletion(-)
|
|diff --git a/app/code/Magento/InventoryCatalog/Plugin/CatalogInventory/Model/Indexer/ModifySelectInProductPriceIndexFilter.php b/app/code/Magento/InventoryCatalog/Plugin/CatalogInventory/Model/Indexer/ModifySelectInProductPriceIndexFilter.php
|index 1b249c2a559..1ed6e157aa8 100644
|--- a/app/code/Magento/InventoryCatalog/Plugin/CatalogInventory/Model/Indexer/ModifySelectInProductPriceIndexFilter.php
|+++ b/app/code/Magento/InventoryCatalog/Plugin/CatalogInventory/Model/Indexer/ModifySelectInProductPriceIndexFilter.php
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.

1 out of 1 hunk ignored

patch '-p4' --no-backup-if-mismatch -d '/home/dominic/Git/Mage230/vendor/magento/module-inventory' < '/home/dominic/Git/Mage230/patches/composer/2336.patch'
can't find file to patch at input line 14
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|From 62644e2b3f70e16152900c96eef290c9e54085e9 Mon Sep 17 00:00:00 2001
|From: Stepan Furman <furman.stepan@gmail.com>
|Date: Tue, 18 Jun 2019 10:52:22 +0300
|Subject: [PATCH 1/3] MSI-2210: Price Indexer fails with large catalogs
|
|---
| .../ModifySelectInProductPriceIndexFilter.php | 37 ++++++++++++++++++-
| 1 file changed, 35 insertions(+), 2 deletions(-)
|
|diff --git a/app/code/Magento/InventoryCatalog/Plugin/CatalogInventory/Model/Indexer/ModifySelectInProductPriceIndexFilter.php b/app/code/Magento/InventoryCatalog/Plugin/CatalogInventory/Model/Indexer/ModifySelectInProductPriceIndexFilter.php
|index ff3fbe109f9..04b1400ead6 100644
|--- a/app/code/Magento/InventoryCatalog/Plugin/CatalogInventory/Model/Indexer/ModifySelectInProductPriceIndexFilter.php
|+++ b/app/code/Magento/InventoryCatalog/Plugin/CatalogInventory/Model/Indexer/ModifySelectInProductPriceIndexFilter.php
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.

5 out of 5 hunks ignored
can't find file to patch at input line 113
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|
|From b8180cd196d521e361a181559df3a184a2787bb4 Mon Sep 17 00:00:00 2001
|From: Stepan Furman <furman.stepan@gmail.com>
|Date: Sat, 22 Jun 2019 13:10:41 +0300
|Subject: [PATCH 2/3] MSI-2210: get rid of redundant website_id predicate
|
|---
| .../Model/Indexer/ModifySelectInProductPriceIndexFilter.php  | 5 ++---
| 1 file changed, 2 insertions(+), 3 deletions(-)
|
|diff --git a/app/code/Magento/InventoryCatalog/Plugin/CatalogInventory/Model/Indexer/ModifySelectInProductPriceIndexFilter.php b/app/code/Magento/InventoryCatalog/Plugin/CatalogInventory/Model/Indexer/ModifySelectInProductPriceIndexFilter.php
|index 04b1400ead6..1b249c2a559 100644
|--- a/app/code/Magento/InventoryCatalog/Plugin/CatalogInventory/Model/Indexer/ModifySelectInProductPriceIndexFilter.php
|+++ b/app/code/Magento/InventoryCatalog/Plugin/CatalogInventory/Model/Indexer/ModifySelectInProductPriceIndexFilter.php
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.

1 out of 1 hunk ignored

can't find file to patch at input line 139
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|
|From 1081bbb03d086608b6bf8633b3442408fe29f8df Mon Sep 17 00:00:00 2001
|From: Stepan Furman <furman.stepan@gmail.com>
|Date: Sat, 22 Jun 2019 13:46:22 +0300
|Subject: [PATCH 3/3] MSI-2210: fix static test
|
|---
| .../Model/Indexer/ModifySelectInProductPriceIndexFilter.php    | 3 ++-
| 1 file changed, 2 insertions(+), 1 deletion(-)
|
|diff --git a/app/code/Magento/InventoryCatalog/Plugin/CatalogInventory/Model/Indexer/ModifySelectInProductPriceIndexFilter.php b/app/code/Magento/InventoryCatalog/Plugin/CatalogInventory/Model/Indexer/ModifySelectInProductPriceIndexFilter.php
|index 1b249c2a559..1ed6e157aa8 100644
|--- a/app/code/Magento/InventoryCatalog/Plugin/CatalogInventory/Model/Indexer/ModifySelectInProductPriceIndexFilter.php
|+++ b/app/code/Magento/InventoryCatalog/Plugin/CatalogInventory/Model/Indexer/ModifySelectInProductPriceIndexFilter.php
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.

1 out of 1 hunk ignored

   Could not apply patch! Skipping. The error was: Cannot apply patch patches/composer/2336.patch

                                                                               
  [Exception]                                                                  
  Cannot apply patch MSI-2210: Price Indexer fails with large catalogs (patch  
  es/composer/2336.patch)!
1

Solved it.

composer require magento/inventory-composer-metapackage --no-update

That pulled ^1.1 (Nov 2019)

composer update

Then standard magento

php bin/magento cache:clean

php bin/magento setup:upgrade

php bin/magento setup:di:compile

Not spotted any immediate problems. Can confirm changes from patch 2336.patch and 2350.patch came across.

Can confirm a performance improvement in 2.3.0. Not sure what this will mean for future upgrades but good enough for me.

| improve this answer | |
  • 1
    Dominic, it's great that you could figure it out. Thank you for such a detailed post with all of the inaccuracies. We've already added 1.1.3 tag to the repository and will be proceeding to update DevDocs with the correct information. Looks like there was some sort of the error, as we have never had the release mentioned there. – Eugene Nov 4 '19 at 17:17
  • What installation method do you followed for installing magento 2.3? – zus Jan 31 at 11:44
  • For this test case I used the zip downloaded from magento.com/tech-resources/download – Dominic Xigen Jan 31 at 12:58
0

If that doesn't work, you've always got a composer replace: e.g.

{
"name": "company/magento-project",
"description": "eCommerce Platform for Growth (Community Edition)",
"type": "project",
"license": [
    "OSL-3.0",
    "AFL-3.0"
],
"config": {
    "preferred-install": "dist",
    "sort-packages": true,
    "secure-http": true
},
"require": {
    "magento/product-community-edition": "2.3.2",
    "magento/inventory-composer-metapackage": "^1.1.3"
    ...
},
...
"replace": {
    "magento/inventory-composer-metapackage": "^1.1.2"
     ...
}
}

Doing this will remove v1.1.2 and replace match it with v1.1.3.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.