Skip to content

[xray] ObjectDirectory fires callbacks in the same function #2959

@stephanie-wang

Description

@stephanie-wang

Describe the problem

Many of the ObjectDirectory methods (example) take in a callback as an argument. This is natural since the operation to the GCS is asynchronous. However, the callback often gets called in the same function, which makes it easy to do bad things like invalidate an iterator in the caller. This happens even when the operation is synchronous (example).

We should modify this to make sure that callbacks are always fired as a separate handler. We should also make sure that callbacks are only passed in where necessary.

Metadata

Metadata

Labels

bugSomething that is supposed to be working; but isn't

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions