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

Handled MetadataState event. #135

Merged
merged 27 commits into from
Dec 7, 2023
Merged

Handled MetadataState event. #135

merged 27 commits into from
Dec 7, 2023

Conversation

mariacarmina
Copy link
Member

@mariacarmina mariacarmina commented Nov 29, 2023

Fixes #46 .

Changes proposed in this PR:

  • process MetadataState event
  • create functionality for updating the state of the ddo nft in Indexer/index.ts
  • add integration test

@mariacarmina mariacarmina self-assigned this Nov 29, 2023
@mariacarmina mariacarmina marked this pull request as ready for review December 5, 2023 16:53
Base automatically changed from feature/metadata-created to develop December 5, 2023 16:58
@mariacarmina mariacarmina force-pushed the feature/metadata-state branch from 0c29cbe to f4c6d43 Compare December 5, 2023 17:25
src/components/Indexer/index.ts Outdated Show resolved Hide resolved
@bogdanfazakas
Copy link
Member

Also i think it's good that you added lots of logs but maybe we should remove the duplicated ones, so maybe worth taking a look and clear some of the logs, this optional tho

@mariacarmina
Copy link
Member Author

Also i think it's good that you added lots of logs but maybe we should remove the duplicated ones, so maybe worth taking a look and clear some of the logs, this optional tho

There are no duplicates as far as I saw, but I filtered some of them. If you still want to delete some, please specify here which. Thanks!

Copy link
Member

@bogdanfazakas bogdanfazakas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still not sure if we need that new instance of database in the event processor, in the PR we are using that to get the get the DDO and the other instance from indexer main thread to save or update the DDO.
So i think we need to decide how we are going fwd with the database instance singleton or not and keep just one approach, in this case if singleton use the db only from indexer main thread otherwise do anything related to the db in the working threads.

@mariacarmina
Copy link
Member Author

Still not sure if we need that new instance of database in the event processor, in the PR we are using that to get the get the DDO and the other instance from indexer main thread to save or update the DDO. So i think we need to decide how we are going fwd with the database instance singleton or not and keep just one approach, in this case if singleton use the db only from indexer main thread otherwise do anything related to the db in the working threads.

As @paulo-ocean mentioned, this shouldn't be a show stopper. I decided to instantiate a new Database object to the event processor (for the moment I put only in metadata state, but we can declare it globally in that file as config was). If not, I've seen this message of yours @bogdanfazakas:

maybe keeping the necessary logic in the indexer main thread I'd say

Can you give more details about this approach, please?
In other words, for the moment I want to see if this change with database instance is more like an enhancement issue or it will actually break the functionality for POC. Can I have an answer to this statement, please? Because if it's not impacting the functionality for POC (and we decide it that way), maybe we can put these details to a separate issue to tackle it afterwards. What do you think @paulo-ocean @alexcos20 @bogdanfazakas @jamiehewitt15 ?

@jamiehewitt15
Copy link
Member

I agree with paulo's comment on the DB, creating a new instance shouldn't necessarily be a showstopper

not going into details here, but if the issue is having 'DB access', i think that should not be a show stopper. We can always get the DB config and create a new Database instance if needed, anywhere. Its always the same DB everywhere, anyway

@mariacarmina
Copy link
Member Author

Created issue for additional comments that could be tackled after the POC: #149

Copy link
Member

@jamiehewitt15 jamiehewitt15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The concerns mentioned above have been moved to separate issues, so we can proceed to merge this PR and deal with them separately.

@mariacarmina mariacarmina merged commit e09c39e into develop Dec 7, 2023
5 checks passed
@mariacarmina mariacarmina deleted the feature/metadata-state branch December 7, 2023 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants