ZhangJian,

Il giorno mer 8 mag 2024 alle ore 01:34 ZhangJian He <shoot...@gmail.com>
ha scritto:

> Hi, bookKeepers
>
> I've reviewed the PR that introduces `isDriverMetadataServiceAvailable`. I
> have concerns about providing a default implementation that returns a
> constant value like true, it's not a default interface like this.
>
> https://github.com/apache/bookkeeper/pull/4342#discussion_r1591761669
>
> ```
> default E getFirstElement() {
>     return getElements().get(0);
> }
>
> List<E> getElements() {
> }
> ```
>
> - First we don't guarantee/make ABI compatible between minor releases
> - Second, People who implement metadata drivers should implement this
> correctly, it may lead to unintended behavior if it's not properly
> overridden by all implementations.
>
> I'd suggest making this method abstract instead to avoid potential
> misinterpretation.
>

It is fine to make it abstract and implement it in all of the
implementations that we maintain.


Enrico



>
> Thanks
> ZhangJian He
> Twitter: shoothzj
> Wechat: shoothzj
>

Reply via email to