Skip to content

Commit

Permalink
Merge branch '3.3' into fix-3.3-config-override
Browse files Browse the repository at this point in the history
  • Loading branch information
chickenlj authored Jun 6, 2024
2 parents 2b299d1 + b831c26 commit c96720d
Show file tree
Hide file tree
Showing 563 changed files with 3,883 additions and 29,451 deletions.
6 changes: 0 additions & 6 deletions .artifacts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ dubbo-core-spi
dubbo-dependencies
dubbo-dependencies-all
dubbo-dependencies-bom
dubbo-dependencies-zookeeper
dubbo-dependencies-zookeeper-curator5
dubbo-distribution
dubbo-filter-cache
Expand All @@ -47,7 +46,6 @@ dubbo-kubernetes
dubbo-maven-plugin
dubbo-metadata
dubbo-metadata-api
dubbo-metadata-rest
dubbo-metadata-definition-protobuf
dubbo-metadata-processor
dubbo-metadata-report-nacos
Expand Down Expand Up @@ -76,18 +74,14 @@ dubbo-registry-nacos
dubbo-registry-zookeeper
dubbo-remoting
dubbo-remoting-api
dubbo-remoting-http
dubbo-remoting-http12
dubbo-remoting-netty
dubbo-remoting-netty4
dubbo-remoting-zookeeper-api
dubbo-remoting-zookeeper
dubbo-remoting-zookeeper-curator5
dubbo-rpc
dubbo-rpc-api
dubbo-rpc-dubbo
dubbo-rpc-injvm
dubbo-rpc-rest
dubbo-rpc-triple
dubbo-security
dubbo-serialization
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/build-and-test-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ jobs:
env:
DISABLE_FILE_SYSTEM_TEST: true
CURRENT_ROLE: ${{ matrix.case-role }}
DUBBO_DEFAULT_SERIALIZATION: fastjson2
steps:
- uses: actions/checkout@v3
with:
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ target/
.settings/
.project
.classpath
.externalToolBuilders
maven-eclipse.xml

# idea ignore
.idea/
Expand Down Expand Up @@ -50,3 +52,6 @@ dubbo-demo/dubbo-demo-triple/build/*

.git.exec.error

# log files generated by testcase.
dubbo-rpc/dubbo-rpc-api/custom-access.log*

1 change: 1 addition & 0 deletions .licenserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ header:
- 'dubbo-config/dubbo-config-spring/src/test/java/org/apache/dubbo/config/spring/EmbeddedZooKeeper.java'
- 'dubbo-test/dubbo-test-common/src/main/java/org/apache/dubbo/test/common/utils/TestSocketUtils.java'
- 'dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/TriHttp2RemoteFlowController.java'
- 'dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/cors/CorsHeaderFilter.java'
- 'dubbo-common/src/main/java/org/apache/dubbo/common/threadpool/serial/SerializingExecutor.java'
- 'dubbo-maven-plugin/src/main/java/org/apache/dubbo/maven/plugin/aot/AbstractAotMojo.java'
- 'dubbo-maven-plugin/src/main/java/org/apache/dubbo/maven/plugin/aot/AbstractDependencyFilterMojo.java'
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ See [CONTRIBUTING](https://github.com/apache/dubbo/blob/master/CONTRIBUTING.md)
* Fix bugs reported on [issues](https://github.com/apache/dubbo/issues), and send us a pull request.
* Review the existing [pull request](https://github.com/apache/dubbo/pulls).
* Improve the [website](https://github.com/apache/dubbo-website), typically we need
* blog post
* translation on documentation
* use cases around the integration of Dubbo in enterprise systems.
* blog post
* translation on documentation
* use cases around the integration of Dubbo in enterprise systems.
* Improve the [dubbo-admin/dubbo-monitor](https://github.com/apache/dubbo-admin).
* Contribute to the projects listed in [ecosystem](https://github.com/dubbo).
* Other forms of contribution not explicitly enumerated above.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,23 +93,23 @@ public BitList(List<E> originList, BitSet rootSet, List<E> tailList) {
}

// Provided by BitList only
public List<E> getOriginList() {
public synchronized List<E> getOriginList() {
return originList;
}

public void addIndex(int index) {
public synchronized void addIndex(int index) {
this.rootSet.set(index);
}

public int totalSetSize() {
public synchronized int totalSetSize() {
return this.originList.size();
}

public boolean indexExist(int index) {
public synchronized boolean indexExist(int index) {
return this.rootSet.get(index);
}

public E getByIndex(int index) {
public synchronized E getByIndex(int index) {
return this.originList.get(index);
}

Expand All @@ -120,36 +120,36 @@ public E getByIndex(int index) {
* @param target target bitList
* @return this bitList only contains those elements contain in both two list and source bitList's tailList
*/
public BitList<E> and(BitList<E> target) {
public synchronized BitList<E> and(BitList<E> target) {
rootSet.and(target.rootSet);
if (target.getTailList() != null) {
target.getTailList().forEach(this::addToTailList);
}
return this;
}

public BitList<E> or(BitList<E> target) {
public synchronized BitList<E> or(BitList<E> target) {
BitSet resultSet = (BitSet) rootSet.clone();
resultSet.or(target.rootSet);
return new BitList<>(originList, resultSet, tailList);
}

public boolean hasMoreElementInTailList() {
public synchronized boolean hasMoreElementInTailList() {
return CollectionUtils.isNotEmpty(tailList);
}

public List<E> getTailList() {
public synchronized List<E> getTailList() {
return tailList;
}

public void addToTailList(E e) {
public synchronized void addToTailList(E e) {
if (tailList == null) {
tailList = new LinkedList<>();
}
tailList.add(e);
}

public E randomSelectOne() {
public synchronized E randomSelectOne() {
int originSize = originList.size();
int tailSize = tailList != null ? tailList.size() : 0;
int totalSize = originSize + tailSize;
Expand Down Expand Up @@ -181,18 +181,18 @@ public static <T> BitList<T> emptyList() {

// Provided by JDK List interface
@Override
public int size() {
public synchronized int size() {
return rootSet.cardinality() + (CollectionUtils.isNotEmpty(tailList) ? tailList.size() : 0);
}

@Override
public boolean contains(Object o) {
public synchronized boolean contains(Object o) {
int idx = originList.indexOf(o);
return (idx >= 0 && rootSet.get(idx)) || (CollectionUtils.isNotEmpty(tailList) && tailList.contains(o));
}

@Override
public Iterator<E> iterator() {
public synchronized Iterator<E> iterator() {
return new BitListIterator<>(this, 0);
}

Expand All @@ -205,7 +205,7 @@ public Iterator<E> iterator() {
* Notice: It is not recommended adding duplicated element.
*/
@Override
public boolean add(E e) {
public synchronized boolean add(E e) {
int index = originList.indexOf(e);
if (index > -1) {
rootSet.set(index);
Expand All @@ -225,7 +225,7 @@ public boolean add(E e) {
* If the element is not contained in originList, try to remove from tailList.
*/
@Override
public boolean remove(Object o) {
public synchronized boolean remove(Object o) {
int idx = originList.indexOf(o);
if (idx > -1 && rootSet.get(idx)) {
rootSet.set(idx, false);
Expand All @@ -242,7 +242,7 @@ public boolean remove(Object o) {
* This may change the default behaviour when adding new element later.
*/
@Override
public void clear() {
public synchronized void clear() {
rootSet.clear();
// to remove references
originList = Collections.emptyList();
Expand All @@ -252,7 +252,7 @@ public void clear() {
}

@Override
public E get(int index) {
public synchronized E get(int index) {
int bitIndex = -1;
if (index < 0) {
throw new IndexOutOfBoundsException();
Expand All @@ -272,7 +272,7 @@ public E get(int index) {
}

@Override
public E remove(int index) {
public synchronized E remove(int index) {
int bitIndex = -1;
if (index >= rootSet.cardinality()) {
if (CollectionUtils.isNotEmpty(tailList)) {
Expand All @@ -290,7 +290,7 @@ public E remove(int index) {
}

@Override
public int indexOf(Object o) {
public synchronized int indexOf(Object o) {
int bitIndex = -1;
for (int i = 0; i < rootSet.cardinality(); i++) {
bitIndex = rootSet.nextSetBit(bitIndex + 1);
Expand All @@ -311,7 +311,7 @@ public int indexOf(Object o) {

@Override
@SuppressWarnings("unchecked")
public boolean addAll(Collection<? extends E> c) {
public synchronized boolean addAll(Collection<? extends E> c) {
if (c instanceof BitList) {
rootSet.or(((BitList<? extends E>) c).rootSet);
if (((BitList<? extends E>) c).hasMoreElementInTailList()) {
Expand All @@ -325,7 +325,7 @@ public boolean addAll(Collection<? extends E> c) {
}

@Override
public int lastIndexOf(Object o) {
public synchronized int lastIndexOf(Object o) {
int bitIndex = -1;
int index = -1;
if (CollectionUtils.isNotEmpty(tailList)) {
Expand All @@ -344,22 +344,22 @@ public int lastIndexOf(Object o) {
}

@Override
public boolean isEmpty() {
public synchronized boolean isEmpty() {
return this.rootSet.isEmpty() && CollectionUtils.isEmpty(tailList);
}

@Override
public ListIterator<E> listIterator() {
public synchronized ListIterator<E> listIterator() {
return new BitListIterator<>(this, 0);
}

@Override
public ListIterator<E> listIterator(int index) {
public synchronized ListIterator<E> listIterator(int index) {
return new BitListIterator<>(this, index);
}

@Override
public BitList<E> subList(int fromIndex, int toIndex) {
public synchronized BitList<E> subList(int fromIndex, int toIndex) {
BitSet resultSet = (BitSet) rootSet.clone();
List<E> copiedTailList = tailList == null ? null : new LinkedList<>(tailList);
if (toIndex < size()) {
Expand Down Expand Up @@ -414,7 +414,7 @@ public BitListIterator(BitList<E> bitList, int index) {
}

@Override
public boolean hasNext() {
public synchronized boolean hasNext() {
if (isInTailList) {
return tailListIterator.hasNext();
} else {
Expand All @@ -428,7 +428,7 @@ public boolean hasNext() {
}

@Override
public E next() {
public synchronized E next() {
if (isInTailList) {
if (tailListIterator.hasNext()) {
index += 1;
Expand Down Expand Up @@ -457,7 +457,7 @@ public E next() {
}

@Override
public boolean hasPrevious() {
public synchronized boolean hasPrevious() {
if (isInTailList) {
boolean hasPreviousInTailList = tailListIterator.hasPrevious();
if (hasPreviousInTailList) {
Expand All @@ -471,7 +471,7 @@ public boolean hasPrevious() {
}

@Override
public E previous() {
public synchronized E previous() {
if (isInTailList) {
boolean hasPreviousInTailList = tailListIterator.hasPrevious();
if (hasPreviousInTailList) {
Expand Down Expand Up @@ -503,17 +503,17 @@ public E previous() {
}

@Override
public int nextIndex() {
public synchronized int nextIndex() {
return hasNext() ? index + 1 : index;
}

@Override
public int previousIndex() {
public synchronized int previousIndex() {
return index;
}

@Override
public void remove() {
public synchronized void remove() {
if (lastReturnedIndex == -1) {
throw new IllegalStateException();
} else {
Expand All @@ -533,17 +533,17 @@ public void remove() {
}

@Override
public void set(E e) {
public synchronized void set(E e) {
throw new UnsupportedOperationException("Set method is not supported in BitListIterator!");
}

@Override
public void add(E e) {
public synchronized void add(E e) {
throw new UnsupportedOperationException("Add method is not supported in BitListIterator!");
}
}

public ArrayList<E> cloneToArrayList() {
public synchronized ArrayList<E> cloneToArrayList() {
if (rootSet.cardinality() == originList.size() && (CollectionUtils.isEmpty(tailList))) {
return new ArrayList<>(originList);
}
Expand All @@ -553,7 +553,7 @@ public ArrayList<E> cloneToArrayList() {
}

@Override
public BitList<E> clone() {
public synchronized BitList<E> clone() {
return new BitList<>(
originList, (BitSet) rootSet.clone(), tailList == null ? null : new LinkedList<>(tailList));
}
Expand Down
Loading

0 comments on commit c96720d

Please sign in to comment.