Skip to content

Instantly share code, notes, and snippets.

View DiannaHohensee's full-sized avatar

Dianna Hohensee DiannaHohensee

View GitHub Profile
1> [2024-08-29T12:07:08,519][DEBUG][o.e.c.r.a.a.DesiredBalanceShardsAllocator] [node_t0] Executing allocate for [12]
1> [2024-08-29T12:07:08,519][TRACE][o.e.c.r.a.a.DesiredBalanceShardsAllocator] [node_t0] Reconciling desired balance: DesiredBalance[lastConvergedIndex=11, assignments={}]
1> [2024-08-29T12:07:08,520][DEBUG][o.e.c.r.a.a.DesiredBalanceReconciler] [node_t0] Reconciling desired balance for [11]
1> [2024-08-29T12:07:08,520][TRACE][o.e.c.r.a.a.DesiredBalanceShardsAllocator] [node_t0] Reconciled desired balance: DesiredBalance[lastConvergedIndex=11, assignments={}]
1> [2024-08-29T12:07:08,520][DEBUG][o.e.c.r.a.a.DesiredBalanceShardsAllocator] [node_t0] Starting desired balance computation for [12]
1> [2024-08-29T12:07:08,520][TRACE][o.e.c.r.a.a.DesiredBalanceComputer] [node_t0] Recomputing desired balance for [12]: DesiredBalance[lastConvergedIndex=11, assignments={}], routing_nodes:
1> -----node_id[q24VcceoTY-cq6vgafXpOQ][V]
diff --git a/server/src/main/java/org/elasticsearch/indices/recovery/PeerRecoveryTargetService.java b/server/src/main/java/org/elasticsearch/indices/recovery/PeerRecoveryTargetService.java
index 3447cc73a42..b336a849336 100644
--- a/server/src/main/java/org/elasticsearch/indices/recovery/PeerRecoveryTargetService.java
+++ b/server/src/main/java/org/elasticsearch/indices/recovery/PeerRecoveryTargetService.java
@@ -401,6 +401,7 @@ public class PeerRecoveryTargetService implements IndexEventListener {
assert startingSeqNo == UNASSIGNED_SEQ_NO || recoveryTarget.state().getStage() == RecoveryState.Stage.TRANSLOG
: "unexpected recovery stage [" + recoveryTarget.state().getStage() + "] starting seqno [ " + startingSeqNo + "]";
final var startRequest = getStartRecoveryRequest(logger, clusterService.localNode(), recoveryTarget, startingSeqNo);
+ logger.info("~~~PeerRecoveryTargetService - START_RECOVERY");
return
diff --git a/modules/stateless/build.gradle.kts b/modules/stateless/build.gradle.kts
index 775463f2..15c4419f 100644
--- a/modules/stateless/build.gradle.kts
+++ b/modules/stateless/build.gradle.kts
@@ -5,6 +5,7 @@ plugins {
id("elasticsearch.internal-cluster-test")
id("elasticsearch.internal-yaml-rest-test")
id("elasticsearch.internal-test-artifact")
+ id("elasticsearch.internal-java-rest-test")
}
diff --git a/modules/stateless/src/javaRestTest/java/co/elastic/elasticsearch/stateless/allocation/ServerlessDefaultShardAllocationSettingsRestIT.java b/modules/stateless/src/javaRestTest/java/co/elastic/elasticsearch/stateless/allocation/ServerlessDefaultShardAllocationSettingsRest
IT.java
index fc89ac28..d7c9dd14 100644
--- a/modules/stateless/src/javaRestTest/java/co/elastic/elasticsearch/stateless/allocation/ServerlessDefaultShardAllocationSettingsRestIT.java
+++ b/modules/stateless/src/javaRestTest/java/co/elastic/elasticsearch/stateless/allocation/ServerlessDefaultShardAllocationSettingsRestIT.java
@@ -17,7 +17,7 @@
package co.elastic.elasticsearch.stateless.allocation;
-//import co.elastic.elasticsearch.serverless.constants.ProjectType;
@Before
public void setupTest() throws IOException {
indexNode = startMasterAndIndexNode();
searchNodeWithStrategy = startSearchNode(repositoryStrategy);
indexName = randomAlphaOfLength(10).toLowerCase(Locale.ROOT);
XContentBuilder mapping = jsonBuilder().startObject().field("dynamic", true).endObject();
assertAcked(indicesAdmin().prepareCreate(indexName).setMapping(mapping).setSettings(
// Disruption Scheme: node_t2, node_t0 node_t1
1> [2022-11-09T06:01:27,610][INFO ][o.e.d.ClusterDisruptionIT] [testAckedIndexing] disruption scheme [network disruption (disruption type: network disconnects, disrupted links: two partitions (partition 1: [node_t2, node_t0] and partition 2: [node_t1]))] added
-----------------------------
// DISRUPTING ----------
/**
*
*/
public void testClusterStateCleanup() throws Exception {
final int NUM_NODES = 3;
// TODO: figure out how to manipulate the election settings so that elections occur and are quick -- took like 30 seconds?!?! And multiple elections occurred, races.
final Settings settings = Settings.builder().put(ELECTION_MAX_TIMEOUT_SETTING.getKey(), "500ms").build();
// Start some master nodes

Serverless / Stateless

Motivation

Serverless concepts partly came out of the March 2022 offsite wherein brainstorming was done to come up with ways to make kubernetes management of an elasticsearch cluster easier.

The difference between stateless and serverless

  • Stateless is where data storage and data compute are separated. A user could self-manage a kubernetes cluster of elasticsearch nodes along with a backing object store
/**
- Insert a single object
- Update a single object
- Delete a single object
- Update a list of objects
*/
#include <iostream>
#include <iostream>
#include <thread>
#include <atomic>
#include <vector>
#include <string>
#include <unordered_map>
#include <mutex>
#include <array>
/**