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

bugfix: fix vGroupMappingManager is NOT init #7025

Merged
merged 28 commits into from
Nov 22, 2024
Merged
Changes from 27 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
50c77dc
add signature
ggbocoder Jan 2, 2024
b36f5b2
Merge remote-tracking branch 'upstream/2.x' into 2.x
ggbocoder Jan 20, 2024
e15537d
Merge remote-tracking branch 'upstream/2.x' into 2.x
ggbocoder Jan 25, 2024
85398ec
Merge remote-tracking branch 'upstream/2.x' into 2.x
ggbocoder Jan 31, 2024
e049125
Merge remote-tracking branch 'upstream/2.x' into 2.x
ggbocoder Mar 7, 2024
2939f59
Merge remote-tracking branch 'upstream/2.x' into 2.x
ggbocoder May 12, 2024
ebeda3a
Merge remote-tracking branch 'upstream/2.x' into 2.x
ggbocoder Jul 5, 2024
f2f9509
Merge branch '2.x' of https://github.com/seata/seata into 2.x
ggbocoder Jul 7, 2024
eed8785
Merge branch '2.x' of https://github.com/seata/seata into 2.x
ggbocoder Jul 15, 2024
5147f84
Merge branch '2.x' of https://github.com/seata/seata into 2.x
ggbocoder Jul 28, 2024
f6f4293
Merge branch '2.x' of https://github.com/seata/seata into 2.x
ggbocoder Aug 3, 2024
858aabd
Merge branch '2.x' of https://github.com/seata/seata into 2.x
ggbocoder Aug 14, 2024
f90f421
Merge branch '2.x' of https://github.com/seata/seata into 2.x
ggbocoder Aug 17, 2024
64a1040
Merge branch '2.x' of https://github.com/seata/seata into 2.x
ggbocoder Aug 19, 2024
892d030
Merge remote-tracking branch 'upstream/2.x' into 2.x
ggbocoder Aug 23, 2024
9422ddd
Merge branch '2.x' of https://github.com/seata/seata into 2.x
ggbocoder Aug 24, 2024
aa805d3
Merge branch '2.x' of https://github.com/seata/seata into 2.x
ggbocoder Aug 28, 2024
95591cc
Merge remote-tracking branch 'upstream/2.x' into 2.x
ggbocoder Aug 31, 2024
6876f1c
Merge remote-tracking branch 'upstream/2.x' into 2.x
ggbocoder Sep 3, 2024
d14deb1
Merge remote-tracking branch 'upstream/2.x' into 2.x
ggbocoder Sep 4, 2024
33d276c
Merge remote-tracking branch 'upstream/2.x' into 2.x
ggbocoder Sep 4, 2024
a1a9cc4
Merge remote-tracking branch 'upstream/2.x' into 2.x
ggbocoder Sep 5, 2024
cc38738
Merge remote-tracking branch 'upstream/2.x' into 2.x
ggbocoder Sep 7, 2024
ebbb3de
Merge remote-tracking branch 'upstream/2.x' into 2.x
ggbocoder Sep 9, 2024
0e66967
Merge remote-tracking branch 'upstream/2.x' into 2.x
ggbocoder Oct 15, 2024
c7047d8
Merge remote-tracking branch 'upstream/2.x' into 2.x
ggbocoder Nov 22, 2024
9f2a394
fix
ggbocoder Nov 22, 2024
27808e8
add signature
ggbocoder Nov 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,6 @@ public class VGroupMappingController {

protected static final Configuration CONFIG = ConfigurationFactory.getInstance();

@PostConstruct
private void init() {
String type =
ConfigurationFactory.getInstance().getConfig(FILE_ROOT_REGISTRY + FILE_CONFIG_SPLIT_CHAR + FILE_ROOT_TYPE);
if (StringUtils.equals(type, NAMING_SERVER)) {
vGroupMappingStoreManager = SessionHolder.getRootVGroupMappingManager();
}
}

/**
* add vGroup in cluster
*
Expand All @@ -67,7 +58,7 @@ public Result<?> addVGroup(@RequestParam String vGroup, @RequestParam String uni
mappingDO.setCluster(Instance.getInstance().getClusterName());
mappingDO.setUnit(unit);
mappingDO.setVGroup(vGroup);
boolean rst = vGroupMappingStoreManager.addVGroup(mappingDO);
boolean rst = SessionHolder.getRootVGroupMappingManager().addVGroup(mappingDO);
Instance.getInstance().setTerm(System.currentTimeMillis());
if (!rst) {
result.setCode("500");
Expand All @@ -85,7 +76,7 @@ public Result<?> addVGroup(@RequestParam String vGroup, @RequestParam String uni
@GetMapping("/removeVGroup")
public Result<?> removeVGroup(@RequestParam String vGroup) {
Result<?> result = new Result<>();
boolean rst = vGroupMappingStoreManager.removeVGroup(vGroup);
boolean rst = SessionHolder.getRootVGroupMappingManager().removeVGroup(vGroup);
Instance.getInstance().setTerm(System.currentTimeMillis());
if (!rst) {
result.setCode("500");
Expand Down
Loading