What are the Slack Archives?
Itβs a history of our time together in the Slack Community! Thereβs a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.
Because this space is not active, you wonβt be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..
What is the relationship with `publish:trigger-events` and `sync:data` ? If I run `publish:trigger-e
What is the relationship with publish:trigger-events
and sync:data
? If I run publish:trigger-events
when do I need to run sync:data
?
Comments
-
publish:trigger-events triggers all propel entity events (as far as I understand, probably the update event for all entities) which leads to the first step of publish / synchronize being executed: the denormalized data is written to the _storage and _search tables in the database. This then automatically triggers the events that lead to the sync part of the publish / sync: writing all the data from _storage tables to redis and all the data from _search tables to elasticsearch. the sync:data command only does the last part, transfering the data from _storage and _search tables to redis and elasticsearch (while _storage and _search are only naming conventions. I think they can be named differently, and also there are at least 1 or 2 tables with _search suffix that do something different)
0 -
so if you only want to sync for example from spy_product_concrete_page_search to elasticsearch, sync:data (-r product_concrete I think also works) would be sufficient. if spy_product_concrete_page_search does not contain the latest data, you need publish:trigger-events (-r product_concrete) to publish the data from spy_product to spy_product_concrete_page_search
0 -
so if I do say, manipulations to image sets in the database directly, should it suffice to publish:trigger-events -r product_abstract_image?
0 -
yes, it should π (I think π )
0 -
I'm starting to get really hesitant to make any SQL changes since I cannot seem to get the indices update cleanly..
0 -
now the imageSets value in glue abstract_products is empty and I don't know why
0 -
hm ok. So you can go step by step from the database side, and look at the spy_product_abstract_image_storage table and see if it contains the correct data
0 -
and if yes, the next step would be to look into the storage (probably redis). you can get the redis key for this from the spy_product_abstract_image_storage table
0 -
or one question: are you querying one specific product or a list of products? if it is a list it might be _search table and elasticsearch instead
0 -
queyring ong product
0 -
/abstract-products/001_4059729207241?include=concrete-products,abstract-product-image-sets,concrete-product-prices,concrete-product-availabilities,category-nodes,concrete-product-image-sets
0 -
something like that
0 -
then the data should come from the redis storage which is (or should be) synced from the spy_product_abstract_image_storage table. I'm not 100% sure about the glue part (because I did not use glue myself, yet): You included the image sets, maybe there is also another include needed for the actual image data?
0 -
I know this is right it just doesn't reflect the db changes
0 -
while there is only one storage table for abstract images so probably they are combined during publish
0 -
then you should look at the spy_product_abstract_image_storage table and search for the product to see if this is correct
0 -
you might also want to look at rabbitmq, if there are any messages on one of the publish.error queues. If so, you can look at the messages in the rabbitmq UI and see if they contain an error message (if something is going wrong during publish)
0 -
storage looks right
0 -
error queues are empty
0 -
then the problem is probably that the data is not updated to redis (so the sync:data part). Depending on your infrastructure you might be able to use some client to connect to it and look at the values. But there is also a UI in Zed to access it under maintenance -> storage I think
0 -
you can use the key for the data set from the spy_product_abstract_image_storage table and search for it in the storage UI
0 -
(in Zed it must be an exact match of the key I think)
0 -
yeah it's redis π
0 -
but I have tinkered so that I have cli access to it as well
0 -
ok, I'm not very familiar with the cli (other then deleting everything π ), but you should be able to search for the key there quite easily
0 -
I think its just GET ... π
0 -
the root cause might be that I didn't quite get how the product-image connection works
0 -
in glue?
0 -
in the database
0 -
ah ok
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 69 Spryker News
- 896 Developer Corner
- 758 Spryker Development
- 83 Spryker Dev Environment
- 361 Spryker Releases
- 3 Oryx frontend framework
- 34 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 23 Job Opportunities
- 3.2K π Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 68 Spryker Safari Questions
- 50 Random