Description
steps to reproduce:
1) create new plan, let's call it P1
2) create second plan, let's call it P2
3) create a new branch for plan P1, as a name use "branch"
4) create a new branch for plan P2, as a name use the same "branch"
5) admin->system->indexing->full_reindex->perform
6a) Error message appears:
Indexing operation failed - errors occurred while indexing.: java.lang.IllegalArgumentException: Duplicate keys in mappings com.atlassian.bamboo.plan.branch.ChainBranchImpl@b2172046=0 and com.atlassian.bamboo.plan.branch.ChainBranchImpl@38c544dc=0
6b) not sure what is the expected behavior... should we allow indexing multiple branches with the same name?
stacktrace:
java.lang.IllegalArgumentException: Duplicate keys in mappings com.atlassian.bamboo.plan.branch.ChainBranchImpl@b2172046=0 and com.atlassian.bamboo.plan.branch.ChainBranchImpl@38c544dc=0 at com.google.common.collect.ImmutableSortedMap.validateEntries(ImmutableSortedMap.java:285) at com.google.common.collect.ImmutableSortedMap.copyOfInternal(ImmutableSortedMap.java:262) at com.google.common.collect.ImmutableSortedMap.copyOf(ImmutableSortedMap.java:201) at com.atlassian.bamboo.index.DefaultBuildResultsIndexer.reindexAll(DefaultBuildResultsIndexer.java:71) at com.atlassian.bamboo.index.ReindexAction.execute(ReindexAction.java:68) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597)
relevant part (DefaultBuildResultsIndexer.java:71):
ImmutableSortedMap<Plan, Long> sortedPlanMap = ImmutableSortedMap.copyOf(planMap, Ordering.natural().onResultOf(Functions.forMap(planMap)).reverse().compound(getPlanNameProviderCaseInsensitiveOrdering()));
Attachments
Issue Links
- copied to
-
BDEV-470 Loading...