Skip to content

Import/Export not working and Read Transactions on Read Replicas failing#552

Open
mtrutledge wants to merge 4 commits into
HotcakesCommerce:developmentfrom
mtrutledge:ImportExportNotWorking
Open

Import/Export not working and Read Transactions on Read Replicas failing#552
mtrutledge wants to merge 4 commits into
HotcakesCommerce:developmentfrom
mtrutledge:ImportExportNotWorking

Conversation

@mtrutledge

Copy link
Copy Markdown
Contributor

Related to Issue

Fixes an issue with the Import/Export failing with Object Ref errors because the CurrentContext User was null #

Description

If the number of items to export was above 250 it would fail. An import would fail with a bunch of Object Ref Errors, even when importing the same exact file that was previously exported.

I had to set the HttpContext before setting the HccRequestContext. Also, when the HttpContext.Current was null it was always returning a new HccRequestContext even if _current was set.

In addition there was a race condition with Order Transactions when using scale out read replicas. If the read replica did not replicate fast enough the order transaction was never recognized and the order workflows would fail. I made sure that when reading order transactions that it always reads from the Main Instance instead of a read replica.

How Has This Been Tested?

I built my changes and deployed to my development test site. This site was not able to import or export. After applying my changes I was able to import and export.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@mtrutledge

Copy link
Copy Markdown
Contributor Author

This might fix #541

…n a update import is done it will wipe out all exisiting options
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant