Skip to content

Commit 6d23d8f

Browse files
committed
Merge branch 'master' into soft-delete-policy-off-by-one
* master: Remove _type term filters from cluster alert watches (elastic#38819) Adjust log and unmute testFailOverOnFollower (elastic#38762) Fix line separators in JSON logging tests (elastic#38771) Fix synchronization in LocalCheckpointTracker#contains (elastic#38755) muted test Remove TLSv1.2 pinning in ssl reload tests (elastic#38651) Don't fail init script if `/proc/.../max_map_count` absent (elastic#35933) Format Watcher.status.lastChecked and lastMetCondition (elastic#38626) SQL: Implement `::` cast operator (elastic#38774) Ignore failing test
2 parents 7b564de + d09ed17 commit 6d23d8f

File tree

33 files changed

+1368
-1079
lines changed

33 files changed

+1368
-1079
lines changed

buildSrc/src/test/java/org/elasticsearch/gradle/BuildExamplePluginsIT.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import org.elasticsearch.gradle.test.GradleIntegrationTestCase;
2424
import org.gradle.testkit.runner.GradleRunner;
2525
import org.junit.BeforeClass;
26+
import org.junit.Ignore;
2627
import org.junit.Rule;
2728
import org.junit.rules.TemporaryFolder;
2829

@@ -38,6 +39,7 @@
3839
import java.util.Objects;
3940
import java.util.stream.Collectors;
4041

42+
@Ignore // https://github.com/elastic/elasticsearch/issues/38784
4143
public class BuildExamplePluginsIT extends GradleIntegrationTestCase {
4244

4345
private static final List<File> EXAMPLE_PLUGINS = Collections.unmodifiableList(

distribution/packages/src/deb/init.d/elasticsearch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ case "$1" in
122122
ulimit -l $MAX_LOCKED_MEMORY
123123
fi
124124

125-
if [ -n "$MAX_MAP_COUNT" -a -f /proc/sys/vm/max_map_count -a "$MAX_MAP_COUNT" -gt $(cat /proc/sys/vm/max_map_count) ]; then
125+
if [ -n "$MAX_MAP_COUNT" -a -f /proc/sys/vm/max_map_count ] && [ "$MAX_MAP_COUNT" -gt $(cat /proc/sys/vm/max_map_count) ]; then
126126
sysctl -q -w vm.max_map_count=$MAX_MAP_COUNT
127127
fi
128128

distribution/packages/src/rpm/init.d/elasticsearch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ start() {
9090
if [ -n "$MAX_LOCKED_MEMORY" ]; then
9191
ulimit -l $MAX_LOCKED_MEMORY
9292
fi
93-
if [ -n "$MAX_MAP_COUNT" -a -f /proc/sys/vm/max_map_count -a "$MAX_MAP_COUNT" -gt $(cat /proc/sys/vm/max_map_count) ]; then
93+
if [ -n "$MAX_MAP_COUNT" -a -f /proc/sys/vm/max_map_count ] && [ "$MAX_MAP_COUNT" -gt $(cat /proc/sys/vm/max_map_count) ]; then
9494
sysctl -q -w vm.max_map_count=$MAX_MAP_COUNT
9595
fi
9696

docs/reference/sql/functions/operators.asciidoc

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,21 @@ include-tagged::{sql-specs}/arithmetic.sql-spec[multiply]
126126
include-tagged::{sql-specs}/arithmetic.sql-spec[divide]
127127
--------------------------------------------------
128128

129-
* https://en.wikipedia.org/wiki/Modulo_operation[Modulo] or Reminder(`%`)
129+
* https://en.wikipedia.org/wiki/Modulo_operation[Modulo] or Remainder(`%`)
130130

131131
["source","sql",subs="attributes,callouts,macros"]
132132
--------------------------------------------------
133133
include-tagged::{sql-specs}/arithmetic.sql-spec[mod]
134134
--------------------------------------------------
135+
136+
[[sql-operators-cast]]
137+
=== Cast Operators
138+
139+
* Cast (`::`)
140+
141+
`::` provides an alternative syntax to the <<sql-functions-type-conversion-cast>> function.
142+
143+
["source","sql",subs="attributes,callouts,macros"]
144+
--------------------------------------------------
145+
include-tagged::{sql-specs}/docs.csv-spec[conversionStringToLongCastOperator]
146+
--------------------------------------------------

qa/logging-config/src/test/java/org/elasticsearch/common/logging/JsonLoggerTests.java

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
* It has to be in a <code>org.elasticsearch.common.logging</code> package to use <code>PrefixLogger</code>
4747
*/
4848
public class JsonLoggerTests extends ESTestCase {
49+
private static final String LINE_SEPARATOR = System.lineSeparator();
4950

5051
@BeforeClass
5152
public static void initNodeName() {
@@ -109,15 +110,15 @@ public void testPrefixLoggerInJson() throws IOException {
109110

110111
public void testJsonInMessage() throws IOException {
111112
final Logger testLogger = LogManager.getLogger("test");
112-
String json = "{\n" +
113-
" \"terms\" : {\n" +
114-
" \"user\" : [\n" +
115-
" \"u1\",\n" +
116-
" \"u2\",\n" +
117-
" \"u3\"\n" +
118-
" ],\n" +
119-
" \"boost\" : 1.0\n" +
120-
" }\n" +
113+
String json = "{" + LINE_SEPARATOR +
114+
" \"terms\" : {" + LINE_SEPARATOR +
115+
" \"user\" : [" + LINE_SEPARATOR +
116+
" \"u1\"," + LINE_SEPARATOR +
117+
" \"u2\"," + LINE_SEPARATOR +
118+
" \"u3\"" + LINE_SEPARATOR +
119+
" ]," + LINE_SEPARATOR +
120+
" \"boost\" : 1.0" + LINE_SEPARATOR +
121+
" }" + LINE_SEPARATOR +
121122
"}";
122123

123124
testLogger.info(json);
@@ -151,15 +152,15 @@ public void testStacktrace() throws IOException {
151152
public void testJsonInStacktraceMessageIsSplitted() throws IOException {
152153
final Logger testLogger = LogManager.getLogger("test");
153154

154-
String json = "{\n" +
155-
" \"terms\" : {\n" +
156-
" \"user\" : [\n" +
157-
" \"u1\",\n" +
158-
" \"u2\",\n" +
159-
" \"u3\"\n" +
160-
" ],\n" +
161-
" \"boost\" : 1.0\n" +
162-
" }\n" +
155+
String json = "{" + LINE_SEPARATOR +
156+
" \"terms\" : {" + LINE_SEPARATOR +
157+
" \"user\" : [" + LINE_SEPARATOR +
158+
" \"u1\"," + LINE_SEPARATOR +
159+
" \"u2\"," + LINE_SEPARATOR +
160+
" \"u3\"" + LINE_SEPARATOR +
161+
" ]," + LINE_SEPARATOR +
162+
" \"boost\" : 1.0" + LINE_SEPARATOR +
163+
" }" + LINE_SEPARATOR +
163164
"}";
164165
testLogger.error("error message " + json, new Exception(json));
165166

server/src/main/java/org/elasticsearch/index/seqno/LocalCheckpointTracker.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,11 +157,11 @@ public boolean contains(final long seqNo) {
157157
return true;
158158
}
159159
final long bitSetKey = getBitSetKey(seqNo);
160-
final CountedBitSet bitSet;
160+
final int bitSetOffset = seqNoToBitSetOffset(seqNo);
161161
synchronized (this) {
162-
bitSet = processedSeqNo.get(bitSetKey);
162+
final CountedBitSet bitSet = processedSeqNo.get(bitSetKey);
163+
return bitSet != null && bitSet.get(bitSetOffset);
163164
}
164-
return bitSet != null && bitSet.get(seqNoToBitSetOffset(seqNo));
165165
}
166166

167167
/**

server/src/main/java/org/elasticsearch/index/shard/IndexShard.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,8 @@ private Engine.IndexResult index(Engine engine, Engine.Index index) throws IOExc
779779
try {
780780
if (logger.isTraceEnabled()) {
781781
// don't use index.source().utf8ToString() here source might not be valid UTF-8
782-
logger.trace("index [{}][{}] (seq# [{}])", index.type(), index.id(), index.seqNo());
782+
logger.trace("index [{}][{}] seq# [{}] allocation-id {}",
783+
index.type(), index.id(), index.seqNo(), routingEntry().allocationId());
783784
}
784785
result = engine.index(index);
785786
} catch (Exception e) {

server/src/test/java/org/elasticsearch/common/logging/JsonThrowablePatternConverterTests.java

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
import static org.hamcrest.Matchers.equalTo;
3333

3434
public class JsonThrowablePatternConverterTests extends ESTestCase {
35-
JsonThrowablePatternConverter converter = JsonThrowablePatternConverter.newInstance(null, null);
35+
private static final String LINE_SEPARATOR = System.lineSeparator();
36+
private JsonThrowablePatternConverter converter = JsonThrowablePatternConverter.newInstance(null, null);
3637

3738
public void testNoStacktrace() throws IOException {
3839
LogEvent event = Log4jLogEvent.newBuilder()
@@ -48,15 +49,15 @@ public void testNoStacktrace() throws IOException {
4849

4950
public void testStacktraceWithJson() throws IOException {
5051

51-
String json = "{\n" +
52-
" \"terms\" : {\n" +
53-
" \"user\" : [\n" +
54-
" \"u1\",\n" +
55-
" \"u2\",\n" +
56-
" \"u3\"\n" +
57-
" ],\n" +
58-
" \"boost\" : 1.0\n" +
59-
" }\n" +
52+
String json = "{" + LINE_SEPARATOR +
53+
" \"terms\" : {" + LINE_SEPARATOR +
54+
" \"user\" : [" + LINE_SEPARATOR +
55+
" \"u1\"," + LINE_SEPARATOR +
56+
" \"u2\"," + LINE_SEPARATOR +
57+
" \"u3\"" + LINE_SEPARATOR +
58+
" ]," + LINE_SEPARATOR +
59+
" \"boost\" : 1.0" + LINE_SEPARATOR +
60+
" }" + LINE_SEPARATOR +
6061
"}";
6162
Exception thrown = new Exception(json);
6263
LogEvent event = Log4jLogEvent.newBuilder()
@@ -73,7 +74,7 @@ public void testStacktraceWithJson() throws IOException {
7374
.findFirst()
7475
.orElseThrow(() -> new AssertionError("no logs parsed"));
7576

76-
int jsonLength = json.split("\n").length;
77+
int jsonLength = json.split(LINE_SEPARATOR).length;
7778
int stacktraceLength = thrown.getStackTrace().length;
7879
assertThat("stacktrace should formatted in multiple lines. JsonLogLine= " + jsonLogLine+" result= "+result,
7980
jsonLogLine.stacktrace().size(), equalTo(jsonLength + stacktraceLength));

test/framework/src/main/java/org/elasticsearch/index/engine/EngineTestCase.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -997,8 +997,9 @@ public static List<DocIdSeqNoAndTerm> getDocIds(Engine engine, boolean refresh)
997997
}
998998
}
999999
}
1000-
docs.sort(Comparator.comparing(DocIdSeqNoAndTerm::getId)
1001-
.thenComparingLong(DocIdSeqNoAndTerm::getSeqNo).thenComparingLong(DocIdSeqNoAndTerm::getPrimaryTerm));
1000+
docs.sort(Comparator.comparingLong(DocIdSeqNoAndTerm::getSeqNo)
1001+
.thenComparingLong(DocIdSeqNoAndTerm::getPrimaryTerm)
1002+
.thenComparing((DocIdSeqNoAndTerm::getId)));
10021003
return docs;
10031004
}
10041005
}

x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/CcrIntegTestCase.java

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
import org.elasticsearch.common.network.NetworkModule;
3939
import org.elasticsearch.common.settings.Settings;
4040
import org.elasticsearch.common.unit.TimeValue;
41+
import org.elasticsearch.common.util.set.Sets;
4142
import org.elasticsearch.common.xcontent.XContentBuilder;
4243
import org.elasticsearch.core.internal.io.IOUtils;
4344
import org.elasticsearch.env.NodeEnvironment;
@@ -451,8 +452,18 @@ protected void assertIndexFullyReplicatedToFollower(String leaderIndex, String f
451452
logger.info("--> asserting <<docId,seqNo>> between {} and {}", leaderIndex, followerIndex);
452453
assertBusy(() -> {
453454
Map<Integer, List<DocIdSeqNoAndTerm>> docsOnFollower = getDocIdAndSeqNos(clusterGroup.followerCluster, followerIndex);
454-
logger.info("--> docs on the follower {}", docsOnFollower);
455-
assertThat(docsOnFollower, equalTo(getDocIdAndSeqNos(clusterGroup.leaderCluster, leaderIndex)));
455+
Map<Integer, List<DocIdSeqNoAndTerm>> docsOnLeader = getDocIdAndSeqNos(clusterGroup.leaderCluster, leaderIndex);
456+
Map<Integer, Set<DocIdSeqNoAndTerm>> mismatchedDocs = new HashMap<>();
457+
for (Map.Entry<Integer, List<DocIdSeqNoAndTerm>> fe : docsOnFollower.entrySet()) {
458+
Set<DocIdSeqNoAndTerm> d1 = Sets.difference(
459+
Sets.newHashSet(fe.getValue()), Sets.newHashSet(docsOnLeader.getOrDefault(fe.getKey(), Collections.emptyList())));
460+
Set<DocIdSeqNoAndTerm> d2 = Sets.difference(
461+
Sets.newHashSet(docsOnLeader.getOrDefault(fe.getKey(), Collections.emptyList())), Sets.newHashSet(fe.getValue()));
462+
if (d1.isEmpty() == false || d2.isEmpty() == false) {
463+
mismatchedDocs.put(fe.getKey(), Sets.union(d1, d2));
464+
}
465+
}
466+
assertThat("mismatched documents [" + mismatchedDocs + "]", docsOnFollower, equalTo(docsOnLeader));
456467
}, 120, TimeUnit.SECONDS);
457468

458469
logger.info("--> asserting seq_no_stats between {} and {}", leaderIndex, followerIndex);
@@ -481,13 +492,15 @@ private Map<Integer, List<DocIdSeqNoAndTerm>> getDocIdAndSeqNos(InternalTestClus
481492
Randomness.shuffle(shardRoutings);
482493
final Map<Integer, List<DocIdSeqNoAndTerm>> docs = new HashMap<>();
483494
for (ShardRouting shardRouting : shardRoutings) {
484-
if (shardRouting == null || shardRouting.assignedToNode() == false || docs.containsKey(shardRouting.shardId().id())) {
495+
if (shardRouting == null || shardRouting.assignedToNode() == false) {
485496
continue;
486497
}
487498
IndexShard indexShard = cluster.getInstance(IndicesService.class, state.nodes().get(shardRouting.currentNodeId()).getName())
488499
.indexServiceSafe(shardRouting.index()).getShard(shardRouting.id());
489500
try {
490-
docs.put(shardRouting.shardId().id(), IndexShardTestCase.getDocIdAndSeqNos(indexShard).stream()
501+
final List<DocIdSeqNoAndTerm> docsOnShard = IndexShardTestCase.getDocIdAndSeqNos(indexShard);
502+
logger.info("--> shard {} docs {} seq_no_stats {}", shardRouting, docsOnShard, indexShard.seqNoStats());
503+
docs.put(shardRouting.shardId().id(), docsOnShard.stream()
491504
// normalize primary term as the follower use its own term
492505
.map(d -> new DocIdSeqNoAndTerm(d.getId(), d.getSeqNo(), 1L))
493506
.collect(Collectors.toList()));

x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/ccr/FollowStatsIT.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ public void testFollowStatsApiResourceNotFound() throws Exception {
149149
assertAcked(client().execute(PauseFollowAction.INSTANCE, new PauseFollowAction.Request("follower1")).actionGet());
150150
}
151151

152+
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/38779")
152153
public void testFollowStatsApiIncludeShardFollowStatsWithRemovedFollowerIndex() throws Exception {
153154
final String leaderIndexSettings = getIndexSettings(1, 0,
154155
singletonMap(IndexSettings.INDEX_SOFT_DELETES_SETTING.getKey(), "true"));

x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/ccr/FollowerFailOverIT.java

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -45,22 +45,24 @@
4545
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
4646
import static org.hamcrest.Matchers.equalTo;
4747

48-
@TestLogging("org.elasticsearch.xpack.ccr:TRACE,org.elasticsearch.index.shard:DEBUG")
48+
@TestLogging("org.elasticsearch.xpack.ccr:TRACE,org.elasticsearch.xpack.ccr.action.ShardChangesAction:DEBUG,"
49+
+ "org.elasticsearch.index.shard:TRACE")
4950
public class FollowerFailOverIT extends CcrIntegTestCase {
5051

5152
@Override
5253
protected boolean reuseClusters() {
5354
return false;
5455
}
5556

56-
@AwaitsFix(bugUrl="https://github.com/elastic/elasticsearch/issues/38633")
5757
public void testFailOverOnFollower() throws Exception {
58+
final String leaderIndex = "leader_test_failover";
59+
final String followerIndex = "follower_test_failover";
5860
int numberOfReplicas = between(1, 2);
5961
getFollowerCluster().startMasterOnlyNode();
6062
getFollowerCluster().ensureAtLeastNumDataNodes(numberOfReplicas + between(1, 2));
6163
String leaderIndexSettings = getIndexSettings(1, numberOfReplicas,
6264
singletonMap(IndexSettings.INDEX_SOFT_DELETES_SETTING.getKey(), "true"));
63-
assertAcked(leaderClient().admin().indices().prepareCreate("leader-index").setSource(leaderIndexSettings, XContentType.JSON));
65+
assertAcked(leaderClient().admin().indices().prepareCreate(leaderIndex).setSource(leaderIndexSettings, XContentType.JSON));
6466
AtomicBoolean stopped = new AtomicBoolean();
6567
Thread[] threads = new Thread[between(1, 8)];
6668
AtomicInteger docID = new AtomicInteger();
@@ -77,20 +79,20 @@ public void testFailOverOnFollower() throws Exception {
7779
}
7880
if (frequently()) {
7981
String id = Integer.toString(frequently() ? docID.incrementAndGet() : between(0, 10)); // sometimes update
80-
IndexResponse indexResponse = leaderClient().prepareIndex("leader-index", "doc", id)
82+
IndexResponse indexResponse = leaderClient().prepareIndex(leaderIndex, "doc", id)
8183
.setSource("{\"f\":" + id + "}", XContentType.JSON).get();
82-
logger.info("--> index id={} seq_no={}", indexResponse.getId(), indexResponse.getSeqNo());
84+
logger.info("--> index {} id={} seq_no={}", leaderIndex, indexResponse.getId(), indexResponse.getSeqNo());
8385
} else {
8486
String id = Integer.toString(between(0, docID.get()));
85-
DeleteResponse deleteResponse = leaderClient().prepareDelete("leader-index", "doc", id).get();
86-
logger.info("--> delete id={} seq_no={}", deleteResponse.getId(), deleteResponse.getSeqNo());
87+
DeleteResponse deleteResponse = leaderClient().prepareDelete(leaderIndex, "doc", id).get();
88+
logger.info("--> delete {} id={} seq_no={}", leaderIndex, deleteResponse.getId(), deleteResponse.getSeqNo());
8789
}
8890
}
8991
});
9092
threads[i].start();
9193
}
9294
availableDocs.release(between(100, 200));
93-
PutFollowAction.Request follow = putFollow("leader-index", "follower-index");
95+
PutFollowAction.Request follow = putFollow(leaderIndex, followerIndex);
9496
follow.getParameters().setMaxReadRequestOperationCount(randomIntBetween(32, 2048));
9597
follow.getParameters().setMaxReadRequestSize(new ByteSizeValue(randomIntBetween(1, 4096), ByteSizeUnit.KB));
9698
follow.getParameters().setMaxOutstandingReadRequests(randomIntBetween(1, 10));
@@ -99,27 +101,27 @@ public void testFailOverOnFollower() throws Exception {
99101
follow.getParameters().setMaxOutstandingWriteRequests(randomIntBetween(1, 10));
100102
logger.info("--> follow request {}", Strings.toString(follow));
101103
followerClient().execute(PutFollowAction.INSTANCE, follow).get();
102-
disableDelayedAllocation("follower-index");
103-
ensureFollowerGreen("follower-index");
104-
awaitGlobalCheckpointAtLeast(followerClient(), new ShardId(resolveFollowerIndex("follower-index"), 0), between(30, 80));
104+
disableDelayedAllocation(followerIndex);
105+
ensureFollowerGreen(followerIndex);
106+
awaitGlobalCheckpointAtLeast(followerClient(), new ShardId(resolveFollowerIndex(followerIndex), 0), between(30, 80));
105107
final ClusterState clusterState = getFollowerCluster().clusterService().state();
106-
for (ShardRouting shardRouting : clusterState.routingTable().allShards("follower-index")) {
108+
for (ShardRouting shardRouting : clusterState.routingTable().allShards(followerIndex)) {
107109
if (shardRouting.primary()) {
108110
DiscoveryNode assignedNode = clusterState.nodes().get(shardRouting.currentNodeId());
109111
getFollowerCluster().restartNode(assignedNode.getName(), new InternalTestCluster.RestartCallback());
110112
break;
111113
}
112114
}
113115
availableDocs.release(between(50, 200));
114-
ensureFollowerGreen("follower-index");
116+
ensureFollowerGreen(followerIndex);
115117
availableDocs.release(between(50, 200));
116-
awaitGlobalCheckpointAtLeast(followerClient(), new ShardId(resolveFollowerIndex("follower-index"), 0), between(100, 150));
118+
awaitGlobalCheckpointAtLeast(followerClient(), new ShardId(resolveFollowerIndex(followerIndex), 0), between(100, 150));
117119
stopped.set(true);
118120
for (Thread thread : threads) {
119121
thread.join();
120122
}
121-
assertIndexFullyReplicatedToFollower("leader-index", "follower-index");
122-
pauseFollow("follower-index");
123+
assertIndexFullyReplicatedToFollower(leaderIndex, followerIndex);
124+
pauseFollow(followerIndex);
123125
}
124126

125127
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/33337")

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/watch/WatchStatus.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ public ZonedDateTime lastChecked() {
8080
return lastChecked;
8181
}
8282

83+
public ZonedDateTime lastMetCondition() {
84+
return lastMetCondition;
85+
}
86+
8387
public ActionStatus actionStatus(String actionId) {
8488
return actions.get(actionId);
8589
}
@@ -252,10 +256,10 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws
252256
builder.field(Field.STATE.getPreferredName(), state, params);
253257
}
254258
if (lastChecked != null) {
255-
builder.timeField(Field.LAST_CHECKED.getPreferredName(), lastChecked);
259+
writeDate(Field.LAST_CHECKED.getPreferredName(), builder, lastChecked);
256260
}
257261
if (lastMetCondition != null) {
258-
builder.timeField(Field.LAST_MET_CONDITION.getPreferredName(), lastMetCondition);
262+
writeDate(Field.LAST_MET_CONDITION.getPreferredName(), builder, lastMetCondition);
259263
}
260264
if (actions != null) {
261265
builder.startObject(Field.ACTIONS.getPreferredName());

0 commit comments

Comments
 (0)