Commit 07e799e4 authored by 吴晟's avatar 吴晟 Committed by 彭勇升 pengys
Browse files

Fix bugs (#1854)

* Avoid service inventory object concurrency situation.

* Fix concurrency for minute persistence and others

* Fix document todo.

* Update license. Fix package with dirty agent plugin jar files.

* Fixed not combine error in persistence register worker.
parent 279c81e9
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -225,15 +225,15 @@ Apache 2.0 licenses
The following components are provided under the Apache License. See project link for details.
The text of each license is the standard Apache 2.0 license.

    raphw (byte-buddy) 1.7.9: http://bytebuddy.net/ , Apache 2.0
    Google: grpc 1.8.0: https://grpc.io/ , Apache 2.0
    Google: gprc-java 1.8.0: https://github.com/grpc/grpc-java, Apache 2.0
    raphw (byte-buddy) 1.9.2: http://bytebuddy.net/ , Apache 2.0
    Google: grpc 1.10.0: https://grpc.io/ , Apache 2.0
    Google: gprc-java 1.10.0: https://github.com/grpc/grpc-java, Apache 2.0
    Google: guava 19.0: https://github.com/google/guava , Apache 2.0
    Google: gson 2.8.1: https://github.com/google/gson , Apache 2.0
    Google: opencensus-java 0.8.0: https://github.com/census-instrumentation/opencensus-java , Apache 2.0
    Google: proto-google-common-protos 0.1.9: https://github.com/googleapis/googleapis , Apache 2.0
    Google: jsr305 3.0.0: http://central.maven.org/maven2/com/google/code/findbugs/jsr305/3.0.0/jsr305-3.0.0.pom , Apache 2.0
    Elasticsearch BV (Elasticsearch) 5.5.0: https://www.elastic.co/products/elasticsearch , Apache 2.0
    Elasticsearch BV (Elasticsearch) 6.3.2: https://www.elastic.co/products/elasticsearch , Apache 2.0
    lang-mustache-client 5.5.0: https://github.com/elastic/elasticsearch/tree/master/modules/lang-mustache , Apache 2.0
    parent-join-client 5.5.0: https://github.com/elastic/elasticsearch/tree/master/modules/parent-join , Apache 2.0
    reindex-client 5.5.0: https://github.com/elastic/elasticsearch/tree/master/modules/reindex , Apache 2.0
+1 −0
Original line number Diff line number Diff line
@@ -103,6 +103,7 @@
                        </goals>
                        <configuration>
                            <tasks>
                                <delete dir="${project.basedir}/../../skywalking-agent" />
                                <mkdir dir="${project.basedir}/../../skywalking-agent" />
                                <copy file="${project.build.directory}/skywalking-agent.jar" tofile="${project.basedir}/../../skywalking-agent/skywalking-agent.jar" overwrite="true" />
                                <mkdir dir="${project.basedir}/../../skywalking-agent/config" />
+0 −4
Original line number Diff line number Diff line
@@ -38,7 +38,3 @@ cluster:
    labelSelector: app=collector,release=skywalking
    uidEnvName: SKYWALKING_COLLECTOR_UID
```

TODO @hanahmily

settings descriptions.
 No newline at end of file
+7 −3
Original line number Diff line number Diff line
@@ -48,9 +48,6 @@ public class IndicatorTransWorker extends AbstractWorker<Indicator> {
    }

    @Override public void in(Indicator indicator) {
        if (Objects.nonNull(minutePersistenceWorker)) {
            minutePersistenceWorker.in(indicator);
        }
        if (Objects.nonNull(hourPersistenceWorker)) {
            hourPersistenceWorker.in(indicator.toHour());
        }
@@ -60,5 +57,12 @@ public class IndicatorTransWorker extends AbstractWorker<Indicator> {
        if (Objects.nonNull(monthPersistenceWorker)) {
            monthPersistenceWorker.in(indicator.toMonth());
        }
        /**
         * Minute persistent must be at the end of all time dimensionalities
         * Because #toHour, #toDay, #toMonth include clone inside, which could avoid concurrency situation.
         */
        if (Objects.nonNull(minutePersistenceWorker)) {
            minutePersistenceWorker.in(indicator);
        }
    }
}
+14 −0
Original line number Diff line number Diff line
@@ -76,6 +76,20 @@ public class ServiceInventory extends RegisterSource {
        return result;
    }

    public ServiceInventory getClone() {
        ServiceInventory inventory = new ServiceInventory();
        inventory.setSequence(getSequence());
        inventory.setRegisterTime(getRegisterTime());
        inventory.setHeartbeatTime(getHeartbeatTime());
        inventory.setName(name);
        inventory.setIsAddress(isAddress);
        inventory.setAddressId(addressId);
        inventory.setMappingLastUpdateTime(mappingLastUpdateTime);
        inventory.setMappingServiceId(mappingServiceId);

        return inventory;
    }

    @Override public boolean equals(Object obj) {
        if (this == obj)
            return true;
Loading