Hi,

2014-08-22 10:31 GMT-04:00 Alex Parvulescu <alex.parvule...@gmail.com>:
> It looks a bit confusing that you can call the apis to create a checkpoint
> and get back a reference but when retrieving it, it might not exist, even
> if the calls are back to back.

I'd call that a bug, as the behavior clearly breaks the documented
contract of the method.

> Alternatives mentioned are
>  - return null if the checkpoint was not created
>  - throw en exception

Throwing an exception seems like the correct solution here, as not
being able to create a checkpoint is an exceptional situation, much
like when a commit fails for similar reasons.

> I vote -0 for the change, I believe that making this more complicated than
> it needs to be (more null checks, or a try/catch) doesn't really benefit
> anybody.

I think there's more extra complication in having to deal with a
potentially non-existent return value.

BR.

Jukka Zitting

Reply via email to