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

ConditionDistributedEmbedStorage这块的逻辑是不是存在问题? #12273

Closed
MangerLe opened this issue Jun 22, 2024 · 5 comments
Closed
Labels
kind/question Category issues related to questions or problems

Comments

@MangerLe
Copy link

public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
return DatasourceConfiguration.isEmbeddedStorage() && !EnvUtil.getStandaloneMode();
}
isEmbeddedStorage的取值就是EnvUtil.getStandaloneMode()啊,为什么要这样写???
Clip_2024-06-22_22-20-20
Clip_2024-06-22_22-20-34

@MangerLe
Copy link
Author

Clip_2024-06-22_22-25-34
这个是不是也不需要后面重复的去判断了??

@KomachiSion
Copy link
Collaborator

有区别, 默认值是standalonemode, 但是集群模式时也可以指定derby数据库作为存储, 此时会由于设置的不同,导致虽然不是standalone, 但是isEmbeeded=true

@KomachiSion KomachiSion added the kind/question Category issues related to questions or problems label Jun 24, 2024
@MangerLe
Copy link
Author

有区别, 默认值是standalonemode, 但是集群模式时也可以指定derby数据库作为存储, 此时会由于设置的不同,导致虽然不是standalone, 但是isEmbeeded=true

你的意思是 会导致isEmbeddedStorage的取值和EnvUtil.getStandaloneMode()取值不一样?? 现在看起来这两个的取值是一样的 所以没理解

@KomachiSion
Copy link
Collaborator

bin/startup.sh -p embedded

这样启动的时候不加standaone,就会以集群模式启动EmbeddedStorage。

此时getStandaloneMode和isEmbeddedStorage不一致。

@MangerLe
Copy link
Author

时getStandaloneMode和isEmbeddedStorage不一致

明白了,谢谢。打扰您了!

zhouchunhai added a commit to zhouchunhai/nacos that referenced this issue Oct 31, 2024
KomachiSion pushed a commit that referenced this issue Dec 5, 2024
#12805)

* The error message is not user-friendly when adding duplicate permissions. (#12273)

* The error message is not user-friendly when adding duplicate permissions. (#12773)

* add some unit test.

* fix ci fail.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Category issues related to questions or problems
Projects
None yet
Development

No branches or pull requests

2 participants