Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
youfanx committed Aug 6, 2024
1 parent c34174a commit f0926fb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
9 changes: 7 additions & 2 deletions rxlib/src/main/java/org/rx/core/Reflects.java
Original file line number Diff line number Diff line change
Expand Up @@ -208,12 +208,14 @@ static <TP, TR> SerializedLambda getLambda(BiFunc<TP, TR> func) {
}

static final int APPEND_TO_COLLECTION = 1;
static final int WRITE_QUIETLY = 1 << 1;

/**
* @param instance
* @param fieldPath
* @param value
* @param flags 1 append to Collection
* @param flags 1 append to Collection
* 1 << 1 write quietly
*/
public static void writeFieldByPath(Object instance, String fieldPath, Object value, int flags) {
final String c = ".";
Expand Down Expand Up @@ -262,7 +264,10 @@ public static void writeFieldByPath(Object instance, String fieldPath, Object va
field.set(cur, changeType(value, field.getType()));
}
} catch (Throwable e) {
throw new InvalidException("Write field {} fail", fieldPath, e);
if ((flags & WRITE_QUIETLY) != WRITE_QUIETLY) {
throw new InvalidException("Write field {} fail", fieldPath, e);
}
log.warn("Write field {} fail", fieldPath, e);
}
}

Expand Down
4 changes: 2 additions & 2 deletions rxlib/src/main/resources/rx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ app:
writeQueueLength: 100
flushQueuePeriod: 1000
errorMessageSize: 10
slowMethodElapsedMicros: 50000
slowMethodElapsedMicros: 1000000
watchThreadFlags: 1
samplingCpuPeriod: 30000
threadPool:
Expand All @@ -15,7 +15,7 @@ app:
highCpuWaterMark: 70
replicas: 2
maxTraceDepth: 5
slowMethodSamplingPercent: 1
slowMethodSamplingPercent: 2
cpuLoadWarningThreshold: 80
samplingPeriod: 3000
samplingTimes: 2
Expand Down

0 comments on commit f0926fb

Please sign in to comment.