Skip to content

Instantly share code, notes, and snippets.

View DiannaHohensee's full-sized avatar

Dianna Hohensee DiannaHohensee

View GitHub Profile
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>
/**
diff --git a/jstests/replsets/libs/rollback_test.js b/jstests/replsets/libs/rollback_test.js
index 8a19b15b51d..aa2e65572cd 100644
--- a/jstests/replsets/libs/rollback_test.js
+++ b/jstests/replsets/libs/rollback_test.js
@@ -296,6 +296,17 @@ function RollbackTest(name = "RollbackTest", replSet, nodeOptions) {
return rst.getPrimary(ReplSetTest.kDefaultTimeoutMS, kRetryIntervalMS);
}
+ this.stepUpNode = function(conn) {
+ log(`Waiting for the new primary ${conn.host} to be elected`);
#include <iostream>
#include <string>
/**
* Writes a pretty asterisks pyramid to std::cout.
* The "n" value specifies how many rows tall the pyramid will be.
*/
void generateAsterisksPyramid(int n) {
// Example n=3
// " * "