Refactor: refactor dataflow_service.go and guard nats message re-delivery (#16826)

### Summary

1. refactor dataflow_service.go 
2. guard nats message re-delivery
3. support document parse cancelling & re-run
This commit is contained in:
Jack
2026-07-13 11:08:04 +08:00
committed by GitHub
parent 347a45967e
commit 3c0f8fc192
70 changed files with 4901 additions and 2401 deletions

View File

@@ -105,6 +105,11 @@ func (e *elasticsearchEngine) GetType() string {
return "elasticsearch"
}
// SupportsPageRank returns true because Elasticsearch supports pagerank.
func (e *elasticsearchEngine) SupportsPageRank() bool {
return true
}
// Ping health check
func (e *elasticsearchEngine) Ping(ctx context.Context) error {
req := esapi.InfoRequest{}

View File

@@ -76,6 +76,9 @@ type DocEngine interface {
// GetType returns the engine type
GetType() string
// SupportsPageRank reports whether the engine supports dataset-level pagerank.
SupportsPageRank() bool
// FilterDocIdsByMetaPushdown runs a metadata filter directly against
// the doc metadata index, returning matching doc IDs or nil if push-down
// is not supported (caller should fall back to in-memory filtering).

View File

@@ -191,6 +191,11 @@ func (e *infinityEngine) GetType() string {
return "infinity"
}
// SupportsPageRank returns false because Infinity does not support pagerank.
func (e *infinityEngine) SupportsPageRank() bool {
return false
}
// Ping checks if Infinity is accessible
func (e *infinityEngine) Ping(ctx context.Context) error {
if e.client == nil || e.client.conn == nil {

View File

@@ -253,3 +253,7 @@ func (m *NatsMessageHandle) Ack() error {
func (m *NatsMessageHandle) Nack() error {
return m.message.Nak()
}
func (m *NatsMessageHandle) InProgress() error {
return m.message.InProgress()
}