Fix/Meta returns old expired objects #262

Merged
fyrchik merged 1 commit from fix/meta-returns-old-expired-objects into master 2023-04-19 13:37:40 +00:00
Contributor
No description provided.
carpawell self-assigned this 2023-04-17 17:25:53 +00:00
carpawell changed title from fix/Meta returns old expired objects to Fix/Meta returns old expired objects 2023-04-17 17:26:01 +00:00
carpawell force-pushed fix/meta-returns-old-expired-objects from ed632f904e to 536ab6ec81 2023-04-17 17:32:27 +00:00 Compare
carpawell requested review from storage-core-developers 2023-04-17 17:32:52 +00:00
carpawell requested review from storage-core-committers 2023-04-17 17:32:52 +00:00
carpawell requested review from fyrchik 2023-04-17 17:32:56 +00:00
dstepanov-yadro approved these changes 2023-04-18 05:08:42 +00:00
acid-ant approved these changes 2023-04-18 07:32:52 +00:00
fyrchik reviewed 2023-04-18 07:56:13 +00:00
@ -261,1 +263,4 @@
}
// performs an unmarshalled object validity checks.
func unmarshalAndValidate(data []byte, currEpoch uint64) (*object.Object, error) {
Owner

Why have you decided to validate here instead of in final Get step, right before returning a result?

Why have you decided to validate here instead of in final `Get` step, right before returning a result?
Author
Contributor

can you, please, add details a little? validate what?

it is just best we can do if we have already unmarshaled an obj, get has multiple returns so i just moved unmarshaling to that func. do you mean do validation via defer?

can you, please, add details a little? validate what? it is just best we can do if we have already unmarshaled an obj, `get` has multiple `return`s so i just moved unmarshaling to that func. do you mean do validation via `defer`?
Owner

I mean checking this not inside the transaction, but outside.
.Attributes() allocates, iteration is not as fast as it could be and write tx can only execute in 1 thread.

I mean checking this not inside the transaction, but outside. `.Attributes()` allocates, iteration is not as fast as it could be and write tx can only execute in 1 thread.
Owner

get is used in Delete, for example, do we have a test for deleting an expired object?

`get` is used in `Delete`, for example, do we have a test for deleting an expired object?
Author
Contributor

I mean checking this not inside the transaction, but outside.

oh, i see, did not think about that and forget at all that it executes inside a TX, fixed

do we have a test for deleting an expired object?

yes, we have a couple

> I mean checking this not inside the transaction, but outside. oh, i see, did not think about that and forget at all that it executes inside a TX, fixed > do we have a test for deleting an expired object? yes, we have a couple
carpawell force-pushed fix/meta-returns-old-expired-objects from 536ab6ec81 to 4301674c27 2023-04-19 13:08:58 +00:00 Compare
fyrchik approved these changes 2023-04-19 13:37:35 +00:00
fyrchik merged commit 3d23b08773 into master 2023-04-19 13:37:40 +00:00
fyrchik deleted branch fix/meta-returns-old-expired-objects 2023-04-19 13:37:40 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-node#262
No description provided.