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

Only 1 deleted record is send to the storage account #123

Closed
WilcoHendriksen opened this issue Apr 29, 2024 · 1 comment · Fixed by #124
Closed

Only 1 deleted record is send to the storage account #123

WilcoHendriksen opened this issue Apr 29, 2024 · 1 comment · Fixed by #124

Comments

@WilcoHendriksen
Copy link
Contributor

WilcoHendriksen commented Apr 29, 2024

version: "24.24.0.0"

Reproduction:
step 1: Add 2 or more new customers
step 2: Export data
step 3: Delete the 2 new customers (they are in ADLSE Deleted Record table, see image)
step 4: Export data
step 5: The storage account only has 1 deleted record

deleted_records

`
FixDeletedRecordThatAreInTable(ADLSEDeletedRecord);

        if EmitTelemetry then begin
            TableCaption := RecordRef.Caption();
            EntityCount := Format(ADLSEDeletedRecord.Count());
            CustomDimensions.Add('Entity', TableCaption);
            CustomDimensions.Add('Entity Count', EntityCount);
            ADLSEExecution.Log('ADLSE-010', 'Deleted records found', Verbosity::Normal, CustomDimensions);
        end;

        repeat
            ADLSEExecution.Log('ADLSE-010x', 'create fakerecord', Verbosity::Normal);
            ADLSEUtil.CreateFakeRecordForDeletedAction(ADLSEDeletedRecord, RecordRef);
            if ADLSECommunication.TryCollectAndSendRecord(RecordRef, ADLSEDeletedRecord."Entry No.", FlushedTimeStamp) then
                DeletedLastEntryNo := FlushedTimeStamp
            else
                Error('%1%2', GetLastErrorText(), GetLastErrorCallStack());
        until ADLSEDeletedRecord.Next() = 0;

`
EntityCount := Format(ADLSEDeletedRecord.Count()); is correct,
but CreateFakeRecordForDeletedAction is only called once... so i'm not sure what is wrong here.

I saw "FixDeletedRecordThatAreInTable" was added at some point. If we comment it out it works again. Maybe issue #110 is related.

@Bertverbeek4PS
Copy link
Owner

Thanks @WilcoHendriksen.
I have analysed it and it was not in the CreateFakeRecordForDeletedAction function (I refactored it also with this PR).
But when you deleted multiple records it was only exported it once. There was no findset in the repeater.

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 a pull request may close this issue.

2 participants