You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When ConvertLegacyStoredDataObserver triggers it can make a query like the following. SELECT `main_table`.* FROM `sales_order` AS `main_table` WHERE (`ext_customer_id` IN(NULL))
This is clearly very expensive; in any case, unnecessary.
Expected behavior
Not make the query when the condition is NULL.
(Note this would be expensive if the condition is not null)
Minimal reproduction of the problem with instructions
Trigger ConvertLegacyStoredDataObserver::execute
Ensure that you react $cards = $this->getCardsFromProfile($profile);
Ensure that $cards = $this->getCardsFromProfile($profile); is not empty
Ensure that $this->convertCards unsets the cards
Update orders is fired with an empty array (Leading to the null above)
What is the motivation / use case for changing the behavior?
Increase performance in the simple case
Environment
Should replicate in 5.1.2 as relevant code appears unchanged
(It does seem that converting guests to customer is contributing as Car.php sets version 200, but customer may be a guest at that point)
The text was updated successfully, but these errors were encountered:
https://github.com/ParadoxLabs-Inc/authnetcim/blob/master/Observer/ConvertLegacyStoredDataObserver.php
🐢 Performance Issue
Current behavior
When ConvertLegacyStoredDataObserver triggers it can make a query like the following.
SELECT `main_table`.* FROM `sales_order` AS `main_table` WHERE (`ext_customer_id` IN(NULL))
This is clearly very expensive; in any case, unnecessary.
Expected behavior
Not make the query when the condition is NULL.
(Note this would be expensive if the condition is not null)
Minimal reproduction of the problem with instructions
$cards = $this->getCardsFromProfile($profile);
$cards = $this->getCardsFromProfile($profile);
is not empty$this->convertCards
unsets the cardsWhat is the motivation / use case for changing the behavior?
Environment
The text was updated successfully, but these errors were encountered: