You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stormcrawler.apache.org by "dpol1 (via GitHub)" <gi...@apache.org> on 2026/04/03 09:56:55 UTC

[PR] Add opensearch-java module using java client [stormcrawler]

dpol1 opened a new pull request, #1868:
URL: https://github.com/apache/stormcrawler/pull/1868

   ## Summary
   
   This PR introduces the `external/opensearch-java` module, migrating StormCrawler from the deprecated `RestHighLevelClient` to the official [`opensearch-java`](https://opensearch.org/docs/latest/clients/java/) client.
   
   Following [suggestion](https://github.com/apache/stormcrawler/issues/1515#issuecomment-4128937174), this is built as a **separate module** to act as a **drop-in replacement**. Users can migrate seamlessly by simply updating their `pom.xml` artifactId, with zero changes required for Flux topologies, imports, or YAML configuration keys.
   
   The legacy `external/opensearch` module remains untouched in this PR to allow a gradual phase-out.
   
   ## Architectural Decisions & Engineering
   
   Since the new `opensearch-java` client introduces a completely different paradigm (fluent builders, strict JSON mappers) and removes several legacy utility classes, the following architectural decisions were made:
   
   ### 1. `AsyncBulkProcessor` & Backpressure
   The legacy `BulkProcessor` was removed in the new client. To prevent `OutOfMemoryError`s and preserve Storm's backpressure, I implemented a custom `AsyncBulkProcessor`:
   * Buffers `BulkOperation`s and flushes based on action count or a `ScheduledExecutorService` timer.
   * Uses a `Semaphore` to limit concurrent in-flight HTTP requests.
   * Uses a dedicated `ThreadPoolExecutor` with `CallerRunsPolicy` to process async callbacks without starving the JVM's `ForkJoinPool.commonPool()`.
   
   ### 2. Transport, 100MB Buffer Limit & Sniffer Support
   In the original issue discussion, I mentioned I would likely use the new `ApacheHttpClient5Transport` and `ApacheHttpClient5Options` to configure the response buffer and bypass the `ContentTooLongException` (100MB ceiling). 
   
   However, during implementation, I realized that switching to HC5 would break the **Sniffer** feature, as the official `opensearch-rest-client-sniffer` heavily relies on the low-level HC4 `RestClient`.
   
   To maintain 100% feature parity as a drop-in replacement, I intentionally kept the `RestClientTransport` (which wraps the HC4 `RestClient`). This brilliantly solves both problems:
   1. The `Sniffer` works out of the box using the underlying `RestClient`.
   2. We bypass the 100MB buffer limit by injecting `HeapBufferedResponseConsumerFactory` via the classic `RequestOptions` (which `RestClientTransport` fully supports).
   
   ### 3. Concurrency & Race Condition Fixes
   During the migration, I identified and fixed a race condition in `IndexerBolt` and `DeletionBolt` where tuples were added to the processor *before* being safely locked in the `waitAck` map. The locking order has been inverted to guarantee zero tuple loss during high-throughput flushes.
   
   ### 4. Upstream Bugfixes Sync
   This module is perfectly aligned with `main`. It incorporates the recent bugfixes applied to the legacy module, adapted for the new asynchronous paradigm:
   * **#1864**: Guarded double-close race conditions in `AbstractSpout`.
   * **#1865**: Fixed resource leaks in `OpenSearchConnection` during `Sniffer` initialization failures.
   * **#1866 & #1867**: Resolved `Timer` and `OpenSearchClient` memory leaks in `JSONResourceWrapper` and `JSONURLFilterWrapper` by properly implementing `cleanup()`.
   
   ## Test plan
   
   - [x] **End-to-End Integration:** Verified the correct behavior of all Spouts and Bolts (`IndexerBolt`, `StatusUpdaterBolt`, `DeletionBolt`, etc.) against a real OpenSearch instance using Testcontainers.
   - [x] **Concurrency & Backpressure:** Validated the custom `AsyncBulkProcessor` under load to ensure it correctly flushes based on size/time thresholds and strictly respects the `Semaphore` concurrency limits without dropping tuples.
   - [x] **Data Serialization:** Confirmed correct JSON serialization for complex types, specifically ensuring that `nextFetchDate` and `timestamp` fields conform to ISO-8601 format to prevent OpenSearch mapping errors.
   - [x] **Archetype Validation:** Verified that the updated Maven archetype successfully generates a working StormCrawler project, correctly wired with the new `opensearch-java` dependency and its associated configurations.
   - [x] **Project Compliance:** Ensured all static analysis checks pass, including Apache RAT for license headers (with explicit safe exclusions for NDJSON dashboards) and code formatting rules.
   
   Closes #1515


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@stormcrawler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add opensearch-java module using java client [stormcrawler]

Posted by "rzo1 (via GitHub)" <gi...@apache.org>.
rzo1 commented on PR #1868:
URL: https://github.com/apache/stormcrawler/pull/1868#issuecomment-4266130210

   @dpol1  opensearch-java 3.x stores hit.source() as a jakarta.json.JsonObject (backed by Parsson). JsonData.to(Class) has this shortcut in JsonDataImpl:                
                                                                                                                                                                                
   `  if (clazz.isAssignableFrom(value.getClass())) return (T) value;           `                                                                                                 
                                                                                                                                                                                
     Since Object.class/Map.class are assignable from JsonObject, hit.source().to(Object.class) returns the raw Parsson JsonObject whose values are JsonString/JsonNumber, not plain String. The (String) keyValues.get(...) then blows up.
   
   Could you check if the following does solve it?
   
   ```
   Index: external/opensearch-java/src/test/java/org/apache/stormcrawler/opensearch/bolt/AbstractOpenSearchTest.java
   IDEA additional info:
   Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
   <+>UTF-8
   ===================================================================
   diff --git a/external/opensearch-java/src/test/java/org/apache/stormcrawler/opensearch/bolt/AbstractOpenSearchTest.java b/external/opensearch-java/src/test/java/org/apache/stormcrawler/opensearch/bolt/AbstractOpenSearchTest.java
   --- a/external/opensearch-java/src/test/java/org/apache/stormcrawler/opensearch/bolt/AbstractOpenSearchTest.java	(revision 6fd51e4ae8b73d468ad7af1d0dde18ecde9ef50c)
   +++ b/external/opensearch-java/src/test/java/org/apache/stormcrawler/opensearch/bolt/AbstractOpenSearchTest.java	(date 1776410127001)
   @@ -27,7 +27,7 @@
    public abstract class AbstractOpenSearchTest {
    
        private static final String OPENSEARCH_VERSION =
   -            System.getProperty("opensearch-version", "2.19.5");
   +            System.getProperty("opensearch-version", "3.5.0");
    
        public static final String PASSWORD = "This1sAPassw0rd";
    
   Index: external/opensearch-java/src/main/java/org/apache/stormcrawler/opensearch/persistence/HybridSpout.java
   IDEA additional info:
   Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
   <+>UTF-8
   ===================================================================
   diff --git a/external/opensearch-java/src/main/java/org/apache/stormcrawler/opensearch/persistence/HybridSpout.java b/external/opensearch-java/src/main/java/org/apache/stormcrawler/opensearch/persistence/HybridSpout.java
   --- a/external/opensearch-java/src/main/java/org/apache/stormcrawler/opensearch/persistence/HybridSpout.java	(revision 6fd51e4ae8b73d468ad7af1d0dde18ecde9ef50c)
   +++ b/external/opensearch-java/src/main/java/org/apache/stormcrawler/opensearch/persistence/HybridSpout.java	(date 1776410122100)
   @@ -24,6 +24,7 @@
    import java.time.ZoneOffset;
    import java.time.format.DateTimeFormatter;
    import java.util.Date;
   +import java.util.LinkedHashMap;
    import java.util.List;
    import java.util.Map;
    import java.util.concurrent.CompletableFuture;
   @@ -214,9 +215,12 @@
                for (Hit<JsonData> hit : hits) {
                    numDocs++;
    
   +                // Passing LinkedHashMap (not Object/Map) forces the JsonpMapper to deserialize
   +                // via Jackson, producing plain Java values (String/Number/List/Map). With
   +                // Object/Map the raw jakarta.json.JsonObject is returned and values remain
   +                // JsonValue instances (e.g. parsson JsonStringImpl), breaking (String) casts.
                    @SuppressWarnings("unchecked")
   -                Map<String, Object> sourceAsMap =
   -                        (Map<String, Object>) hit.source().to(Object.class);
   +                Map<String, Object> sourceAsMap = hit.source().to(LinkedHashMap.class);
    
                    String pfield = partitionField;
                    Map<String, Object> fieldSource = sourceAsMap;
   Index: external/opensearch-java/src/main/java/org/apache/stormcrawler/opensearch/persistence/AggregationSpout.java
   IDEA additional info:
   Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
   <+>UTF-8
   ===================================================================
   diff --git a/external/opensearch-java/src/main/java/org/apache/stormcrawler/opensearch/persistence/AggregationSpout.java b/external/opensearch-java/src/main/java/org/apache/stormcrawler/opensearch/persistence/AggregationSpout.java
   --- a/external/opensearch-java/src/main/java/org/apache/stormcrawler/opensearch/persistence/AggregationSpout.java	(revision 6fd51e4ae8b73d468ad7af1d0dde18ecde9ef50c)
   +++ b/external/opensearch-java/src/main/java/org/apache/stormcrawler/opensearch/persistence/AggregationSpout.java	(date 1776410114080)
   @@ -26,6 +26,7 @@
    import java.util.Date;
    import java.util.HashSet;
    import java.util.Iterator;
   +import java.util.LinkedHashMap;
    import java.util.List;
    import java.util.Locale;
    import java.util.Map;
   @@ -288,8 +289,12 @@
                TopHitsAggregate topHits = entry.aggregations().get("docs").topHits();
                for (Hit<JsonData> hit : topHits.hits().hits()) {
    
   +                // Passing LinkedHashMap (not Object/Map) forces the JsonpMapper to deserialize
   +                // via Jackson, producing plain Java values (String/Number/List/Map). With
   +                // Object/Map the raw jakarta.json.JsonObject is returned and values remain
   +                // JsonValue instances (e.g. parsson JsonStringImpl), breaking (String) casts.
                    @SuppressWarnings("unchecked")
   -                Map<String, Object> keyValues = (Map<String, Object>) hit.source().to(Object.class);
   +                Map<String, Object> keyValues = hit.source().to(LinkedHashMap.class);
    
                    LOG.debug("{} -> id [{}], _source [{}]", logIdprefix, hit.id(), keyValues);
    
   
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@stormcrawler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add opensearch-java module using java client [stormcrawler]

Posted by "rzo1 (via GitHub)" <gi...@apache.org>.
rzo1 commented on PR #1868:
URL: https://github.com/apache/stormcrawler/pull/1868#issuecomment-4222691346

   @dpol1 Think the blocker is gone.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@stormcrawler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add opensearch-java module using java client [stormcrawler]

Posted by "jnioche (via GitHub)" <gi...@apache.org>.
jnioche commented on PR #1868:
URL: https://github.com/apache/stormcrawler/pull/1868#issuecomment-4290327906

   Thanks @dpol1 and @rzo1. I will test it on an existing crawl shortly.
   Could we have a separate PR to port the improvements to the existing module? This would help comparing like for like + users who wish to remain on the old module would benefit from those


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@stormcrawler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add opensearch-java module using java client [stormcrawler]

Posted by "dpol1 (via GitHub)" <gi...@apache.org>.
dpol1 commented on PR #1868:
URL: https://github.com/apache/stormcrawler/pull/1868#issuecomment-4266341474

   @rzo1 thanks for the analysis - that’s exactly what was blowing things up.
   
   I ended up applying the same `LinkedHashMap.class` trick, but centralized it in a `sourceAsMap(JsonData)` helper on `AbstractSpout` instead of inlining it in both spouts:
   
   - workaround + comment live in one place (DRY, less Parsson noise in the spouts)  
   - handles `null` safely and returns an empty map  
   - has its own unit test (`AbstractSpoutTest`) so we notice if the client changes behavior later
   
   Think this approach is more solid, not to refine later - I ran the crawler locally via Docker and perfectly work but please double check.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@stormcrawler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add opensearch-java module using java client [stormcrawler]

Posted by "dpol1 (via GitHub)" <gi...@apache.org>.
dpol1 commented on PR #1868:
URL: https://github.com/apache/stormcrawler/pull/1868#issuecomment-4229245346

   > Thanks @dpol1 Looks good, here are a couple of possible issues flagged by Claude
   > 
   > **1. Timestamp serialization format change (MAJOR — data-compat risk)**
   > 
   > The new module writes timestamps as ISO-8601 strings where the legacy module writes epoch-millis longs:
   > 
   >    * persistence/StatusUpdaterBolt.java:254 — doc.put("nextFetchDate", nextFetch.get().toInstant().toString())
   >       vs legacy persistence/StatusUpdaterBolt.java:252 — builder.timeField("nextFetchDate", nextFetch.get()) (epoch millis)
   > 
   >    * metrics/MetricsConsumer.java:153 — doc.put("timestamp", timestamp.toInstant().toString())
   > 
   >    * metrics/MetricsReporter.java — same pattern for the metric timestamp field.
   > 
   > 
   > Impact depends on index mapping:
   > 
   >    * Indexes using the default date format (strict_date_optional_time||epoch_millis) will accept both — no breakage.
   > 
   >    * Indexes with a custom format: epoch_millis mapping (some deployments use this for compactness) will reject writes from the new module.
   > 
   >    * Mixing writers (legacy + new on the same index) can produce fields with both shapes, which is still queryable but surprising.
   > 
   > 
   > Recommendation: either match legacy (toInstant().toEpochMilli()) or document the format change in the module README and make sure the example mappings under src/test/resources/{status,metrics,indexer}.mapping declare a format that accepts ISO dates.
   
   I tried switching to toEpochMilli(), but it immediately broke AggregationSpout (which expects a String) and caused the tests to fail against the date_optional_time mapping. I thought an hybrid approch which covers both but I don't think is solid - Maybe I forgot something but I've reverted to .toInstant().toString().
   > 
   > **2. responseBufferSize config key silently dropped (MINOR regression)**
   > 
   > Legacy external/opensearch/.../OpenSearchConnection.java:283 reads opensearch.*.responseBufferSize (default 100 MB) and sets it on the HTTP client. The new OpenSearchConnection.java does not reference it. Users who tuned this for large bulk responses will silently lose the setting on migration. The legacy sample external/opensearch/opensearch-conf.yaml documents the key in four places.
   > 
   > Recommendation: either port the setting to the HC5 client builder or list it as a removed key in the new module's README.
   
   Yes properly documented now and for the sniffer as well!
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@stormcrawler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add opensearch-java module using java client [stormcrawler]

Posted by "rzo1 (via GitHub)" <gi...@apache.org>.
rzo1 commented on PR #1868:
URL: https://github.com/apache/stormcrawler/pull/1868#issuecomment-4229698571

   Can you Post the full stacktrace?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@stormcrawler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add opensearch-java module using java client [stormcrawler]

Posted by "dpol1 (via GitHub)" <gi...@apache.org>.
dpol1 commented on PR #1868:
URL: https://github.com/apache/stormcrawler/pull/1868#issuecomment-4187228463

   Thanks by all means, I'll keep the race-condition fix as-is in this module for now. Once your PR on the legacy module lands, I'll double-check the legacy module afterwards and if needed apply to this module as well.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@stormcrawler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add opensearch-java module using java client [stormcrawler]

Posted by "jnioche (via GitHub)" <gi...@apache.org>.
jnioche commented on PR #1868:
URL: https://github.com/apache/stormcrawler/pull/1868#issuecomment-4229401562

   @dpol1 did you run a crawl with this new module?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@stormcrawler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add opensearch-java module using java client [stormcrawler]

Posted by "dpol1 (via GitHub)" <gi...@apache.org>.
dpol1 commented on PR #1868:
URL: https://github.com/apache/stormcrawler/pull/1868#issuecomment-4225117805

   Hi @jnioche, Hi @rzo1 - I've just pushed a major update in this PR - let me know what you think when you have a moment! Cheers.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@stormcrawler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add opensearch-java module using java client [stormcrawler]

Posted by "jnioche (via GitHub)" <gi...@apache.org>.
jnioche commented on PR #1868:
URL: https://github.com/apache/stormcrawler/pull/1868#issuecomment-4228296484

   Looks good, here are a couple of possible issues flagged by Claude
   
   
    **1. Timestamp serialization format change (MAJOR — data-compat risk)**
   
    The new module writes timestamps as ISO-8601 strings where the legacy module writes epoch-millis longs:
   
    - persistence/StatusUpdaterBolt.java:254 — doc.put("nextFetchDate", nextFetch.get().toInstant().toString())
    vs legacy persistence/StatusUpdaterBolt.java:252 — builder.timeField("nextFetchDate", nextFetch.get()) (epoch millis)
    - metrics/MetricsConsumer.java:153 — doc.put("timestamp", timestamp.toInstant().toString())
    - metrics/MetricsReporter.java — same pattern for the metric timestamp field.
   
    Impact depends on index mapping:
    - Indexes using the default date format (strict_date_optional_time||epoch_millis) will accept both — no breakage.
    - Indexes with a custom format: epoch_millis mapping (some deployments use this for compactness) will reject writes from the new module.
    - Mixing writers (legacy + new on the same index) can produce fields with both shapes, which is still queryable but surprising.
   
    Recommendation: either match legacy (toInstant().toEpochMilli()) or document the format change in the module README and make sure the example mappings under src/test/resources/{status,metrics,indexer}.mapping declare a format that
    accepts ISO dates.
   
    **2. responseBufferSize config key silently dropped (MINOR regression)**
   
    Legacy external/opensearch/.../OpenSearchConnection.java:283 reads opensearch.*.responseBufferSize (default 100 MB) and sets it on the HTTP client. The new OpenSearchConnection.java does not reference it. Users who tuned this for large
    bulk responses will silently lose the setting on migration. The legacy sample external/opensearch/opensearch-conf.yaml documents the key in four places.
   
    Recommendation: either port the setting to the HC5 client builder or list it as a removed key in the new module's README.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@stormcrawler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add opensearch-java module using java client [stormcrawler]

Posted by "jnioche (via GitHub)" <gi...@apache.org>.
jnioche merged PR #1868:
URL: https://github.com/apache/stormcrawler/pull/1868


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@stormcrawler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add opensearch-java module using java client [stormcrawler]

Posted by "jnioche (via GitHub)" <gi...@apache.org>.
jnioche commented on PR #1868:
URL: https://github.com/apache/stormcrawler/pull/1868#issuecomment-4182897246

   thanks @dpol1 
   why not use the 3.x branch of OpenSearch since this is a complete rewrite? If this is to replace the older module in the future, we might as well start with whatever is the most recent.
   Are the archetypes and dashboards very different from the existing module? If not, I would be in favour of removing them from here - having duplicates is a pain.
   From a user's perspective all they will have to do is modify the name of the dependency


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@stormcrawler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add opensearch-java module using java client [stormcrawler]

Posted by "rzo1 (via GitHub)" <gi...@apache.org>.
rzo1 commented on PR #1868:
URL: https://github.com/apache/stormcrawler/pull/1868#issuecomment-4282998350

   Thanks for the update. I am going to test this with the current Storm release candidate soon


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@stormcrawler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add opensearch-java module using java client [stormcrawler]

Posted by "dpol1 (via GitHub)" <gi...@apache.org>.
dpol1 commented on PR #1868:
URL: https://github.com/apache/stormcrawler/pull/1868#issuecomment-4186732680

   > thanks @dpol1 why not use the 3.x branch of OpenSearch since this is a complete rewrite? If this is to replace the older module in the future, we might as well start with whatever is the most recent. 
   
   Will do - I focused on the core logic first (`AsyncBulkProcessor` for buffers), the 3.x transport migration is next.
   
   > Are the archetypes and dashboards very different from the existing module? If not, I would be in favour of removing them from here - having duplicates is a pain. 
   
   They are identical to the existing module - removing them in this PR.
   
   > From a user's perspective all they will have to do is modify the name of the dependency
   
   Correct - the only change is the artifactId from `stormcrawler-opensearch` to `stormcrawler-opensearch-java`. The package path and all YAML config keys remain unchanged.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@stormcrawler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add opensearch-java module using java client [stormcrawler]

Posted by "jnioche (via GitHub)" <gi...@apache.org>.
jnioche commented on PR #1868:
URL: https://github.com/apache/stormcrawler/pull/1868#issuecomment-4187147573

   > During the migration, I identified and fixed a race condition in IndexerBolt and DeletionBolt where tuples were added to the processor before being safely locked in the waitAck map. The locking order has been inverted to guarantee zero tuple loss during high-throughput flushes.
   
   Would be good to fix that in the existing module as a separate PR. Am about to push a refactoring of that module though, so maybe best to do after that if still applies?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@stormcrawler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add opensearch-java module using java client [stormcrawler]

Posted by "rzo1 (via GitHub)" <gi...@apache.org>.
rzo1 commented on PR #1868:
URL: https://github.com/apache/stormcrawler/pull/1868#issuecomment-4201434932

   > Thanks by all means, I'll keep the race-condition fix as-is in this module for now. Once your PR on the legacy module lands, I'll double-check the legacy module afterwards and if needed apply to this module as well.
   
   Think there is only one PR left ( https://github.com/apache/stormcrawler/pull/1869 ) and we can move on.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@stormcrawler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add opensearch-java module using java client [stormcrawler]

Posted by "dpol1 (via GitHub)" <gi...@apache.org>.
dpol1 commented on PR #1868:
URL: https://github.com/apache/stormcrawler/pull/1868#issuecomment-4229647918

   Yep, run a crawl locally - Injection worked fine, but the crawler blew up with a ClassCastException in AggregationSpout - Think I'll investigate in this way. Suggestions are welcome :-)
   ```
   java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@stormcrawler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add opensearch-java module using java client [stormcrawler]

Posted by "jnioche (via GitHub)" <gi...@apache.org>.
jnioche commented on PR #1868:
URL: https://github.com/apache/stormcrawler/pull/1868#issuecomment-4290731629

   Tested on a local crawl, no visible issues. Will merge shortly 
   Thanks again @dpol1, this is a very useful contribution. It will allow us to use the most recent versions of OpenSearch


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@stormcrawler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org