Skip to content

Delete operation should only delete attributes which exist in the dictionary#661

Open
vkuznet wants to merge 1 commit into
dmwm:masterfrom
vkuznet:fix-parent-id
Open

Delete operation should only delete attributes which exist in the dictionary#661
vkuznet wants to merge 1 commit into
dmwm:masterfrom
vkuznet:fix-parent-id

Conversation

@vkuznet

@vkuznet vkuznet commented Jul 28, 2022

Copy link
Copy Markdown
Contributor

This PR provides an additional check before deleting certain attributes in file parent dictionaries which may be omitted in the output of blockdumps API. In particular, the newly deployed Go server does not provide parent_file_id in its output, since this information is redundant (i.e. it cannot be used in migration process since these ids have no sense in destination database, and moreover python DBSMigration code does not use this information either). As such, I address this issue in this PR to make it compatible with new Go-based DBS server. We may need it during transition period when we would like to run
side by side both DBSMigration servers.

@vkuznet vkuznet requested a review from amaltaro July 28, 2022 18:01
@vkuznet

vkuznet commented Jul 28, 2022

Copy link
Copy Markdown
Contributor Author

@amaltaro , I would like you to have a look at this PR as I want to make Python migration server compatible with new Go-based server where parent_file_id information is not provided (since it is redundant. The actual issue about this is here https://github.com/dmwm/dbs2go/issues/70 and we need to decide which approach to take, see my reply here https://github.com/dmwm/dbs2go/issues/70#issuecomment-1198175446 I'll comeback to this issue one I back from vacation.

@amaltaro amaltaro left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Valentin, I didn't read all the discussion that you pointed out.
However, to me your change doesn't affect any behavior and it will actually have a safer key deletion. I left a suggestion in the code though.

Comment thread Server/Python/src/dbs/business/DBSBlockInsert.py
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.

2 participants