问:
Quarkus missing acknowledged smallrye kafka messages after restart
My Quarkus App appears to be dropping the first batch of messages sent every time I restart my Docker Container. I am currently running 'Confluentinc' Kafka (Zookeeper/Broker) images. The drop appears to effect the first batch of messages published from a Junit Test each time the Docker Container is destroyed and created. Subsequent re-runs of the same test, do not produce the same failure. This issue seems to happen somewhere between the broker and the Quarkus @Injected @ApplicationScoped "Stuff" listener. This is important because the testing broker from Quarkus (Vectorized/redpanda) is supposed to restart between each test.

Interestingly enough, (sometimes) simply having the Offset Explorer (2.3) connected to the cluster before running the test prevents the the failure from occuring. (!?)

My testing file: https://github.com/Eli-Ronai/QuarkusKafkaBugDemo

```<code>package Test;

import io.quarkus.runtime.StartupEvent;
import io.quarkus.test.junit.QuarkusTest;
import org.eclipse.microprofile.reactive.messaging.Channel;
import org.eclipse.microprofile.reactive.messaging.Emitter;
import org.eclipse.microprofile.reactive.messaging.Incoming;
import org.junit.jupiter.api.*;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;

import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.event.Observes;
import javax.inject.Inject;
import java.util.concurrent.LinkedBlockingQueue;

import static org.testng.Assert.assertEquals;

@ApplicationScoped
class Stuff {
    private static final String TEST_CHANNEL_NAME = "TestChannel1";
    private static final String TEST_CHANNEL_NAME2 = "TestChannel2";
    final LinkedBlockingQueue<String> queue = new LinkedBlockingQueue<>();

    void startup(@Observes StartupEvent event){
        System.out.println("Injected the listener");
    }

    @Inject
    @Channel(TEST_CHANNEL_NAME+"-out")
    Emitter<String> emitter;

    @Inject
    @Channel(TEST_CHANNEL_NAME2+"-out")
    Emitter<String> emitterTwo;

    @Incoming(TEST_CHANNEL_NAME)
    public void listen(String message) throws InterruptedException {
        System.out.println(message);
        queue.put(message);
    }

    @Incoming(TEST_CHANNEL_NAME2)
    public void listen2(String message) throws InterruptedException {
        System.out.println(message);
        queue.put(message);
    }

    public void send(String message) {
        emitter.send(message);
    }

    public String take() throws InterruptedException {
        return queue.take();
    }

    public void sendToTwo(String message) {
        emitterTwo.send(message);
    }
}

@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
@QuarkusTest
public class BufferTests {
    final Stuff stuff;

    @Inject
    public BufferTests(Stuff stuff) {
        this.stuff = stuff;
    }

    @Order(2)
    @ParameterizedTest
    @ValueSource(strings = {"a"})
    @Timeout(10)
    public void TestAsParameterizedTest(String unusedTestId) {
        final int TEST_SIZE = 1000;
        final var mainThread = Thread.currentThread();

        new Thread(() -> {
            final var start = System.currentTimeMillis();

            for (int i = 0; i < TEST_SIZE; i++) {
                stuff.send(Integer.toString(i));
            }

            try {
                synchronized (this) {
                    wait(System.currentTimeMillis() - start + 9000);
                }
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }

            mainThread.interrupt();
        }).start();

        int i = 0;

        try {
            for (; i < TEST_SIZE; i++) {
                System.out.println(stuff.take());
            }
        } catch (InterruptedException ignored) {
        }

        assertEquals(i, TEST_SIZE);
    }

    @Order(4)
    @ParameterizedTest
    @ValueSource(strings = {"a", "b", "c", "d", "e"})
    @Timeout(10)
    public void ConfirmThatTestsRunIndependently(String testId) {
        final int TEST_SIZE = 1000;
        final var mainThread = Thread.currentThread();

        new Thread(() -> {
            final var start = System.currentTimeMillis();

            for (int i = 0; i < TEST_SIZE; i++) {
                stuff.send(i+testId);
            }

            try {
                synchronized (this) {
                    wait(System.currentTimeMillis() - start + 9000);
                }
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }

            mainThread.interrupt();
        }).start();

        int i = 0;

        try {
            for (; i < TEST_SIZE; i++) {
                String item = stuff.take();
                assertEquals(testId, item.substring(item.length()-1));
            }
        } catch (InterruptedException ignored) {
        }
        assertEquals(i, TEST_SIZE);
    }

    @Order(5)
    @ParameterizedTest
    @ValueSource(strings = {"a", "b", "c", "d", "e"})
    @Timeout(10)
    public void ConfirmThatTestsRunIndependentlyParallel(String testId) {
        final int TEST_SIZE = 1000;
        final var mainThread = Thread.currentThread();

        new Thread(() -> {
            final var start = System.currentTimeMillis();

            for (int i = 0; i < TEST_SIZE; i++) {
                stuff.send(i+testId);
            }

            try {
                synchronized (this) {
                    wait(System.currentTimeMillis() - start + 9000);
                }
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }

            mainThread.interrupt();
        }).start();

        int i = 0;

        try {
            for (; i < TEST_SIZE; i++) {
                String item = stuff.take();
                assertEquals(testId, item.substring(item.length()-1));
            }
        } catch (InterruptedException ignored) {
        }
        assertEquals(i, TEST_SIZE);
    }

    @Order(1)
    @ParameterizedTest
    @ValueSource(strings = {"a", "b", "c", "d", "e"})
    @Timeout(10)
    public void ProducesTheBug(String testId) {
        final int TEST_SIZE = 1000;
        final var mainThread = Thread.currentThread();

        //Send
        new Thread(() -> {
            final var start = System.currentTimeMillis();

            for (int i = 0; i < TEST_SIZE; i++) {
                stuff.send(i+testId);
            }

            try {
                synchronized (this) {
                    wait(System.currentTimeMillis() - start + 9000);
                }
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }

            mainThread.interrupt();
        }).start();

        int i = 0;

        //Receive
        try {
            for (; i < TEST_SIZE; i++) {
                String item = stuff.take();
                assertEquals(testId, item.substring(item.length()-1));
            }
        } catch (InterruptedException ignored) {
        }
        assertEquals(i, TEST_SIZE);
    }

    @Order(3)
    @Test
    @Timeout(10)
    // This test is copied and pasted from ProducesTheBug()
    public void DoesNotProduceTheBug() {
        String testId = "a";
        final int TEST_SIZE = 1000;
        final var mainThread = Thread.currentThread();

        //Send
        new Thread(() -> {
            final var start = System.currentTimeMillis();

            for (int i = 0; i < TEST_SIZE; i++) {
                stuff.send(i+testId);
            }

            try {
                synchronized (this) {
                    wait(System.currentTimeMillis() - start + 9000);
                }
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }

            mainThread.interrupt();
        }).start();

        int i = 0;

        //Receive
        try {
            for (; i < TEST_SIZE; i++) {
                String item = stuff.take();
                assertEquals(testId, item.substring(item.length()-1));
            }
        } catch (InterruptedException ignored) {
        }
        assertEquals(i, TEST_SIZE);
    }

    @Order(6)
    @ParameterizedTest
    @ValueSource(strings = {"a", "b", "c", "d", "e"})
    @Timeout(10)
    public void SendTestMessagesToSecondTopic(String testId) {
        final int TEST_SIZE = 1000;
        final var mainThread = Thread.currentThread();

        new Thread(() -> {
            final var start = System.currentTimeMillis();

            for (int i = 0; i < TEST_SIZE; i++) {
                stuff.sendToTwo(i+testId);
            }

            try {
                synchronized (this) {
                    wait(System.currentTimeMillis() - start + 9000);
                }
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }

            mainThread.interrupt();
        }).start();

        int i = 0;

        try {
            for (; i < TEST_SIZE; i++) {
                String item = stuff.take();
                assertEquals(testId, item.substring(item.length()-1));
            }
        } catch (InterruptedException ignored) {
        }
        assertEquals(i, TEST_SIZE);
    }
}

</code>```

application.properties:

```<code>mp.messaging.incoming.TestChannel1.topic=TestChannel1
mp.messaging.incoming.TestChannel1.connector = smallrye-kafka
mp.messaging.outgoing.TestChannel1-out.topic=TestChannel1
mp.messaging.outgoing.TestChannel1-out.connector = smallrye-kafka

mp.messaging.incoming.TestChannel2.topic=TestChannel2
mp.messaging.incoming.TestChannel2.connector = smallrye-kafka
mp.messaging.outgoing.TestChannel2-out.topic=TestChannel2
mp.messaging.outgoing.TestChannel2-out.connector = smallrye-kafka

#Code blow disallows quarkus dev-services from creating a test broker.
quarkus.kafka.devservices.enabled=false
kafka.bootstrap.servers=9092

mp.messaging.incoming.TestChannel1.bootstrap.servers=localhost:9092
mp.messaging.outgoing.TestChannel1-out.bootstrap.servers=localhost:9092
mp.messaging.outgoing.TestChannel1-out.key.deserializer=org.apache.kafka.common.serialization.StringSerializer

mp.messaging.incoming.TestChannel2.bootstrap.servers=localhost:9092
mp.messaging.outgoing.TestChannel2-out.bootstrap.servers=localhost:9092

mp.messaging.incoming.TestChannel1.value.deserializer=org.apache.kafka.common.serialization.StringDeserializer
mp.messaging.outgoing.TestChannel1-out.value.serializer=org.apache.kafka.common.serialization.StringSerializer

mp.messaging.incoming.TestChannel2.value.deserializer=org.apache.kafka.common.serialization.StringDeserializer
mp.messaging.outgoing.TestChannel2-out.value.serializer=org.apache.kafka.common.serialization.StringSerializer
</code>```

docker-compose:

```<code>---
version: '1'
services:
  zookeeper:
    image: confluentinc/cp-zookeeper:latest
    hostname: zookeeper
    container_name: zookeeper
    ports:
      - "2181:2181"
    environment:
      ZOOKEEPER_CLIENT_PORT: 2181
      ZOOKEEPER_TICK_TIME: 2000

  broker:
    image: confluentinc/cp-server:latest
    hostname: broker
    container_name: broker
    depends_on:
      - zookeeper
    ports:
      - "9092:9092"
    environment:
      KAFKA_BROKER_ID: 1
      KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181'
      KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
      KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://broker:49170,PLAINTEXT_HOST://localhost:9092
      KAFKA_METRIC_REPORTERS: io.confluent.metrics.reporter.ConfluentMetricsReporter
      KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
      KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
      KAFKA_CONFLUENT_LICENSE_TOPIC_REPLICATION_FACTOR: 1
      KAFKA_CONFLUENT_BALANCER_TOPIC_REPLICATION_FACTOR: 1
      KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
      KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
      KAFKA_CONFLUENT_SCHEMA_REGISTRY_URL: http://schema-registry:8083/
      CONFLUENT_METRICS_REPORTER_BOOTSTRAP_SERVERS: broker:49170
      CONFLUENT_METRICS_REPORTER_TOPIC_REPLICAS: 1

#  schema-registry:
#    image: confluentinc/cp-schema-registry:latest
#    hostname: schema-registry
#    container_name: schema-registry
#    depends_on:
#      - broker
#    ports:
#      - "8083:8083"
#    environment:
#      SCHEMA_REGISTRY_HOST_NAME: schema-registry
#      SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: 'broker:49170'
#      SCHEMA_REGISTRY_LISTENERS: http://0.0.0.0:8083/
</code>```

Force Eager Loading of the @ApplicationScoped 'Stuff' listener with @Observes StartupEvent constructor
Messages not received.

Verify Messages being published through non-Quarkus listener (Desktop terminal window)
Messages received by pure-kafka consumer.

System.out.println statement in the @Incoming listen method.
Messages not printed to console.

Publish 1000 messages at once.
First batch of 1000 messages do not get delivered, and are also not in Kafka que. (Kafka believes they were acknowledged)

Wait up to 3 minutes after container creation before running tests
Messages not received.
-Publish messages to multiple topics
Messages were received on second topic, the missed messages are limited to the first batch received only.

Added a Schema Registry Dependency to the Docker Compose.
Prevents messages from going missing in the minimal bug reproduction example, but not in the full app.

Stopping And Starting the Container
Message Received, the Docker container must be destroyed and created to reproduce the bug

I am expecting to receive all messages sent through Kafka, in the event that a message is not received, by the @Incoming listener I am expecting that Kafka should not acknowledge the message as received and keep it in the que.

Body:
My Quarkus App appears to be dropping the first batch of messages sent every time I restart my Docker Container. I am currently running 'Confluentinc' Kafka (Zookeeper/Broker) images. The drop appears to effect the first batch of messages published from a Junit Test each time the Docker Container is destroyed and created. Subsequent re-runs of the same test, do not produce the same failure. This issue seems to happen somewhere between the broker and the Quarkus @Injected @ApplicationScoped "Stuff" listener. This is important because the testing broker from Quarkus (Vectorized/redpanda) is supposed to restart between each test.

Interestingly enough, (sometimes) simply having the Offset Explorer (2.3) connected to the cluster before running the test prevents the the failure from occuring. (!?)

My testing file: https://github.com/Eli-Ronai/QuarkusKafkaBugDemo

package Test;

import io.quarkus.runtime.StartupEvent;
import io.quarkus.test.junit.QuarkusTest;
import org.eclipse.microprofile.reactive.messaging.Channel;
import org.eclipse.microprofile.reactive.messaging.Emitter;
import org.eclipse.microprofile.reactive.messaging.Incoming;
import org.junit.jupiter.api.*;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;

import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.event.Observes;
import javax.inject.Inject;
import java.util.concurrent.LinkedBlockingQueue;

import static org.testng.Assert.assertEquals;

@ApplicationScoped
class Stuff {
    private static final String TEST_CHANNEL_NAME = "TestChannel1";
    private static final String TEST_CHANNEL_NAME2 = "TestChannel2";
    final LinkedBlockingQueue<String> queue = new LinkedBlockingQueue<>();

    void startup(@Observes StartupEvent event){
        System.out.println("Injected the listener");
    }

    @Inject
    @Channel(TEST_CHANNEL_NAME+"-out")
    Emitter<String> emitter;

    @Inject
    @Channel(TEST_CHANNEL_NAME2+"-out")
    Emitter<String> emitterTwo;

    @Incoming(TEST_CHANNEL_NAME)
    public void listen(String message) throws InterruptedException {
        System.out.println(message);
        queue.put(message);
    }

    @Incoming(TEST_CHANNEL_NAME2)
    public void listen2(String message) throws InterruptedException {
        System.out.println(message);
        queue.put(message);
    }

    public void send(String message) {
        emitter.send(message);
    }

    public String take() throws InterruptedException {
        return queue.take();
    }

    public void sendToTwo(String message) {
        emitterTwo.send(message);
    }
}

@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
@QuarkusTest
public class BufferTests {
    final Stuff stuff;

    @Inject
    public BufferTests(Stuff stuff) {
        this.stuff = stuff;
    }

    @Order(2)
    @ParameterizedTest
    @ValueSource(strings = {"a"})
    @Timeout(10)
    public void TestAsParameterizedTest(String unusedTestId) {
        final int TEST_SIZE = 1000;
        final var mainThread = Thread.currentThread();

        new Thread(() -> {
            final var start = System.currentTimeMillis();

            for (int i = 0; i < TEST_SIZE; i++) {
                stuff.send(Integer.toString(i));
            }

            try {
                synchronized (this) {
                    wait(System.currentTimeMillis() - start + 9000);
                }
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }

            mainThread.interrupt();
        }).start();

        int i = 0;

        try {
            for (; i < TEST_SIZE; i++) {
                System.out.println(stuff.take());
            }
        } catch (InterruptedException ignored) {
        }

        assertEquals(i, TEST_SIZE);
    }

    @Order(4)
    @ParameterizedTest
    @ValueSource(strings = {"a", "b", "c", "d", "e"})
    @Timeout(10)
    public void ConfirmThatTestsRunIndependently(String testId) {
        final int TEST_SIZE = 1000;
        final var mainThread = Thread.currentThread();

        new Thread(() -> {
            final var start = System.currentTimeMillis();

            for (int i = 0; i < TEST_SIZE; i++) {
                stuff.send(i+testId);
            }

            try {
                synchronized (this) {
                    wait(System.currentTimeMillis() - start + 9000);
                }
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }

            mainThread.interrupt();
        }).start();

        int i = 0;

        try {
            for (; i < TEST_SIZE; i++) {
                String item = stuff.take();
                assertEquals(testId, item.substring(item.length()-1));
            }
        } catch (InterruptedException ignored) {
        }
        assertEquals(i, TEST_SIZE);
    }

    @Order(5)
    @ParameterizedTest
    @ValueSource(strings = {"a", "b", "c", "d", "e"})
    @Timeout(10)
    public void ConfirmThatTestsRunIndependentlyParallel(String testId) {
        final int TEST_SIZE = 1000;
        final var mainThread = Thread.currentThread();

        new Thread(() -> {
            final var start = System.currentTimeMillis();

            for (int i = 0; i < TEST_SIZE; i++) {
                stuff.send(i+testId);
            }

            try {
                synchronized (this) {
                    wait(System.currentTimeMillis() - start + 9000);
                }
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }

            mainThread.interrupt();
        }).start();

        int i = 0;

        try {
            for (; i < TEST_SIZE; i++) {
                String item = stuff.take();
                assertEquals(testId, item.substring(item.length()-1));
            }
        } catch (InterruptedException ignored) {
        }
        assertEquals(i, TEST_SIZE);
    }

    @Order(1)
    @ParameterizedTest
    @ValueSource(strings = {"a", "b", "c", "d", "e"})
    @Timeout(10)
    public void ProducesTheBug(String testId) {
        final int TEST_SIZE = 1000;
        final var mainThread = Thread.currentThread();

        //Send
        new Thread(() -> {
            final var start = System.currentTimeMillis();

            for (int i = 0; i < TEST_SIZE; i++) {
                stuff.send(i+testId);
            }

            try {
                synchronized (this) {
                    wait(System.currentTimeMillis() - start + 9000);
                }
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }

            mainThread.interrupt();
        }).start();

        int i = 0;

        //Receive
        try {
            for (; i < TEST_SIZE; i++) {
                String item = stuff.take();
                assertEquals(testId, item.substring(item.length()-1));
            }
        } catch (InterruptedException ignored) {
        }
        assertEquals(i, TEST_SIZE);
    }

    @Order(3)
    @Test
    @Timeout(10)
    // This test is copied and pasted from ProducesTheBug()
    public void DoesNotProduceTheBug() {
        String testId = "a";
        final int TEST_SIZE = 1000;
        final var mainThread = Thread.currentThread();

        //Send
        new Thread(() -> {
            final var start = System.currentTimeMillis();

            for (int i = 0; i < TEST_SIZE; i++) {
                stuff.send(i+testId);
            }

            try {
                synchronized (this) {
                    wait(System.currentTimeMillis() - start + 9000);
                }
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }

            mainThread.interrupt();
        }).start();

        int i = 0;

        //Receive
        try {
            for (; i < TEST_SIZE; i++) {
                String item = stuff.take();
                assertEquals(testId, item.substring(item.length()-1));
            }
        } catch (InterruptedException ignored) {
        }
        assertEquals(i, TEST_SIZE);
    }

    @Order(6)
    @ParameterizedTest
    @ValueSource(strings = {"a", "b", "c", "d", "e"})
    @Timeout(10)
    public void SendTestMessagesToSecondTopic(String testId) {
        final int TEST_SIZE = 1000;
        final var mainThread = Thread.currentThread();

        new Thread(() -> {
            final var start = System.currentTimeMillis();

            for (int i = 0; i < TEST_SIZE; i++) {
                stuff.sendToTwo(i+testId);
            }

            try {
                synchronized (this) {
                    wait(System.currentTimeMillis() - start + 9000);
                }
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }

            mainThread.interrupt();
        }).start();

        int i = 0;

        try {
            for (; i < TEST_SIZE; i++) {
                String item = stuff.take();
                assertEquals(testId, item.substring(item.length()-1));
            }
        } catch (InterruptedException ignored) {
        }
        assertEquals(i, TEST_SIZE);
    }
}

application.properties:

mp.messaging.incoming.TestChannel1.topic=TestChannel1
mp.messaging.incoming.TestChannel1.connector = smallrye-kafka
mp.messaging.outgoing.TestChannel1-out.topic=TestChannel1
mp.messaging.outgoing.TestChannel1-out.connector = smallrye-kafka

mp.messaging.incoming.TestChannel2.topic=TestChannel2
mp.messaging.incoming.TestChannel2.connector = smallrye-kafka
mp.messaging.outgoing.TestChannel2-out.topic=TestChannel2
mp.messaging.outgoing.TestChannel2-out.connector = smallrye-kafka

#Code blow disallows quarkus dev-services from creating a test broker.
quarkus.kafka.devservices.enabled=false
kafka.bootstrap.servers=9092

mp.messaging.incoming.TestChannel1.bootstrap.servers=localhost:9092
mp.messaging.outgoing.TestChannel1-out.bootstrap.servers=localhost:9092
mp.messaging.outgoing.TestChannel1-out.key.deserializer=org.apache.kafka.common.serialization.StringSerializer

mp.messaging.incoming.TestChannel2.bootstrap.servers=localhost:9092
mp.messaging.outgoing.TestChannel2-out.bootstrap.servers=localhost:9092

mp.messaging.incoming.TestChannel1.value.deserializer=org.apache.kafka.common.serialization.StringDeserializer
mp.messaging.outgoing.TestChannel1-out.value.serializer=org.apache.kafka.common.serialization.StringSerializer

mp.messaging.incoming.TestChannel2.value.deserializer=org.apache.kafka.common.serialization.StringDeserializer
mp.messaging.outgoing.TestChannel2-out.value.serializer=org.apache.kafka.common.serialization.StringSerializer

docker-compose:

---
version: '1'
services:
  zookeeper:
    image: confluentinc/cp-zookeeper:latest
    hostname: zookeeper
    container_name: zookeeper
    ports:
      - "2181:2181"
    environment:
      ZOOKEEPER_CLIENT_PORT: 2181
      ZOOKEEPER_TICK_TIME: 2000

  broker:
    image: confluentinc/cp-server:latest
    hostname: broker
    container_name: broker
    depends_on:
      - zookeeper
    ports:
      - "9092:9092"
    environment:
      KAFKA_BROKER_ID: 1
      KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181'
      KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
      KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://broker:49170,PLAINTEXT_HOST://localhost:9092
      KAFKA_METRIC_REPORTERS: io.confluent.metrics.reporter.ConfluentMetricsReporter
      KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
      KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
      KAFKA_CONFLUENT_LICENSE_TOPIC_REPLICATION_FACTOR: 1
      KAFKA_CONFLUENT_BALANCER_TOPIC_REPLICATION_FACTOR: 1
      KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
      KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
      KAFKA_CONFLUENT_SCHEMA_REGISTRY_URL: http://schema-registry:8083/
      CONFLUENT_METRICS_REPORTER_BOOTSTRAP_SERVERS: broker:49170
      CONFLUENT_METRICS_REPORTER_TOPIC_REPLICAS: 1

#  schema-registry:
#    image: confluentinc/cp-schema-registry:latest
#    hostname: schema-registry
#    container_name: schema-registry
#    depends_on:
#      - broker
#    ports:
#      - "8083:8083"
#    environment:
#      SCHEMA_REGISTRY_HOST_NAME: schema-registry
#      SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: 'broker:49170'
#      SCHEMA_REGISTRY_LISTENERS: http://0.0.0.0:8083/

Force Eager Loading of the @ApplicationScoped 'Stuff' listener with @Observes StartupEvent constructor
Messages not received.

Verify Messages being published through non-Quarkus listener (Desktop terminal window)
Messages received by pure-kafka consumer.

System.out.println statement in the @Incoming listen method.
Messages not printed to console.

Publish 1000 messages at once.
First batch of 1000 messages do not get delivered, and are also not in Kafka que. (Kafka believes they were acknowledged)

Wait up to 3 minutes after container creation before running tests
Messages not received.
-Publish messages to multiple topics
Messages were received on second topic, the missed messages are limited to the first batch received only.

Added a Schema Registry Dependency to the Docker Compose.
Prevents messages from going missing in the minimal bug reproduction example, but not in the full app.

Stopping And Starting the Container
Message Received, the Docker container must be destroyed and created to reproduce the bug

I am expecting to receive all messages sent through Kafka, in the event that a message is not received, by the @Incoming listener I am expecting that Kafka should not acknowledge the message as received and keep it in the que.


来源: stackexchange

问:
Transferring text and files in a multi-user chat
I have a multi-user chat. With the help of which there is an exchange of ordinary text messages. How to make it so that they could exchange both text and files. I don't understand if bytes are coming, then how the server will distinguish the text from the file.

SERVER:

```<code>serv:

import socket, threading  # Импорт библиотек

host = '127.0.0.1'  # Локальный хост компьютера
port = 7976  # Выбор незарезервированного порта

server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)  # Инициализация сокета
server.bind((host, port))  # Назначение хоста и порта к сокету
server.listen()

clients = []
nicknames = []

def broadcast(message):  # Функция связи
    for client in clients:
        client.send(message)

def handle(client):
    while True:
        try:  # Получение сообщений от клиента
            message = client.recv(1024)
            broadcast(message)
        except:  # Удаление клиентов
            index = clients.index(client)
            clients.remove(client)
            client.close()
            nickname = nicknames[index]
            broadcast('{} ушел!'.format(nickname).encode('utf-8'))
            nicknames.remove(nickname)
            break

def receive():  # Подключение нескольких клиентов
    while True:
        client, address = server.accept()
        print("Соединён с {}".format(str(address)))
        client.send('NICKNAME'.encode('utf-8'))
        nickname = client.recv(1024).decode('utf-8')
        nicknames.append(nickname)
        clients.append(client)
        print("Имя пользователя {}".format(nickname))
        broadcast("{} присоединился!".format(nickname).encode('utf-8'))
        client.send('Подключён к серверу!'.encode('utf-8'))
        thread = threading.Thread(target=handle, args=(client,))
        thread.start()

receive()
</code>```

Client

```<code>import socket, threading

nickname = input("Выберите имя пользователя: ")

client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)  # Инициализация сокета

client.connect(('127.0.0.1', 7976))  # Соединение клиента с сервером

def receive():
    while True:  # Подтверждение соединения
        try:
            message = client.recv(1024).decode('utf-8')
            if message == 'NICKNAME':
                client.send(nickname.encode('utf-8'))
            else:
                print(message)

        except:  # Если неправильный ip или порт
            print("Ошибка!")
            client.close()
            break

def write():
    while True:  # Вывод сообщений в чат
        message = '{}: {}'.format(nickname, input(''))
        client.send(message.encode('utf-8'))

receive_thread = threading.Thread(target=receive)  # Получение всех сообщений
receive_thread.start()
write_thread = threading.Thread(target=write)  # Отправка всех сообщений
write_thread.start()
</code>```

Help me write the code for the server and client.

ContentLicense: CC BY-SA 4.0

Body:
I have a multi-user chat. With the help of which there is an exchange of ordinary text messages. How to make it so that they could exchange both text and files. I don't understand if bytes are coming, then how the server will distinguish the text from the file.

SERVER:

serv:

import socket, threading  # Импорт библиотек

host = '127.0.0.1'  # Локальный хост компьютера
port = 7976  # Выбор незарезервированного порта

server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)  # Инициализация сокета
server.bind((host, port))  # Назначение хоста и порта к сокету
server.listen()

clients = []
nicknames = []

def broadcast(message):  # Функция связи
    for client in clients:
        client.send(message)

def handle(client):
    while True:
        try:  # Получение сообщений от клиента
            message = client.recv(1024)
            broadcast(message)
        except:  # Удаление клиентов
            index = clients.index(client)
            clients.remove(client)
            client.close()
            nickname = nicknames[index]
            broadcast('{} ушел!'.format(nickname).encode('utf-8'))
            nicknames.remove(nickname)
            break

def receive():  # Подключение нескольких клиентов
    while True:
        client, address = server.accept()
        print("Соединён с {}".format(str(address)))
        client.send('NICKNAME'.encode('utf-8'))
        nickname = client.recv(1024).decode('utf-8')
        nicknames.append(nickname)
        clients.append(client)
        print("Имя пользователя {}".format(nickname))
        broadcast("{} присоединился!".format(nickname).encode('utf-8'))
        client.send('Подключён к серверу!'.encode('utf-8'))
        thread = threading.Thread(target=handle, args=(client,))
        thread.start()

receive()

Client

import socket, threading

nickname = input("Выберите имя пользователя: ")

client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)  # Инициализация сокета

client.connect(('127.0.0.1', 7976))  # Соединение клиента с сервером

def receive():
    while True:  # Подтверждение соединения
        try:
            message = client.recv(1024).decode('utf-8')
            if message == 'NICKNAME':
                client.send(nickname.encode('utf-8'))
            else:
                print(message)

        except:  # Если неправильный ip или порт
            print("Ошибка!")
            client.close()
            break

def write():
    while True:  # Вывод сообщений в чат
        message = '{}: {}'.format(nickname, input(''))
        client.send(message.encode('utf-8'))

receive_thread = threading.Thread(target=receive)  # Получение всех сообщений
receive_thread.start()
write_thread = threading.Thread(target=write)  # Отправка всех сообщений
write_thread.start()

Help me write the code for the server and client.


问:
Cubecamera Dynamic Reflection Mapping Issue
I'm relative new to threeJS and I'm currently working on a project with the need of dynamic reflection.

I followed the threejs example on the official website and successfully got a working reflection.

However the mapping of the cube camera render target texture seems to be off.

Reflection Image

The left square should be in the white area.

Here's my implementation of the dynamic reflection.

```<code>    cubeRenderTarget = new THREE.WebGLCubeRenderTarget( 128 );
    cubeRenderTarget.texture.type = THREE.HalfFloatType
    cubeCamera = new THREE.CubeCamera( 0.1, 1000, cubeRenderTarget );
    cubeCamera.position.set(0, 0, 30);

    material = new THREE.MeshStandardMaterial( {
        envMap: cubeRenderTarget.texture,
        roughness: 0.03,
        metalness: 1
    } );
    sphere = new THREE.Mesh( new THREE.IcosahedronGeometry( 5, 15 ), material );
    sphere.position.set(0, 0, 30);
    scene.add( sphere );
</code>```

You can check out my full code right here
https://github.com/vonernue/ComputerGraphicsFinal

Body:
I'm relative new to threeJS and I'm currently working on a project with the need of dynamic reflection.

I followed the threejs example on the official website and successfully got a working reflection.

However the mapping of the cube camera render target texture seems to be off.

Reflection Image

The left square should be in the white area.

Here's my implementation of the dynamic reflection.

    cubeRenderTarget = new THREE.WebGLCubeRenderTarget( 128 );
    cubeRenderTarget.texture.type = THREE.HalfFloatType
    cubeCamera = new THREE.CubeCamera( 0.1, 1000, cubeRenderTarget );
    cubeCamera.position.set(0, 0, 30);

    material = new THREE.MeshStandardMaterial( {
        envMap: cubeRenderTarget.texture,
        roughness: 0.03,
        metalness: 1
    } );
    sphere = new THREE.Mesh( new THREE.IcosahedronGeometry( 5, 15 ), material );
    sphere.position.set(0, 0, 30);
    scene.add( sphere );

You can check out my full code right here
https://github.com/vonernue/ComputerGraphicsFinal


问:
flex row messing up during deployment in safari
ive got a next project with tailwind css. however a part of the css goes to hell during deployment, but locally its fine in Safari, in a mobile device. since i dont have an iphone i use an online emulator to simulate the error. the image below is what it looks like when deployed

however when i run it locally, as in i run localhost:3000 on the emulator. everything looks fine like so

Also, since this emulator allows me access to dev tools for which i used inspect. when i tried to turn off and on the flex css (you know when you open inspect, u see all the css styles and a checkbox to turn on or off that css). the display is perfect again! is this a bug or am i missing something?

the code i have above is a carousel and here is the code as follows, where the images i used a map function to display.

```<code> <div
    className="flex flex-row snap-mandatory overflow-y-hidden !overflow-x-hidden scroll-smooth bg-black snap-x indiana-scroll-container indiana-scroll-container--hidescrollbars indiana-scroll-container--native-scroll"
    // onScroll={(e)=>console.log(e.target.scrollLeft)}
    ref={elementRef}
    >
        {
            props.images.map(function(item){
                return <div className="w-full flex-shrink-0 transform cursor-grab snap-center">
                <Image
                    src={item}
                    width={100}
                    height={500}
                    className="w-[100%] sm:object-fill sm:w-full md:max-h-[350px] sm:max-h-[300px] lg:max-h-[450px] xl:max-h-[500px]"
                    unoptimized={true}
                    />
                </div>
            })
        }

    </div>
</code>```

i dont know whats wrong. everything works fine in chrome, but not in safari. and the part where turning on and off the flex manually fixes the display makes me think that my code isnt whats wrong.

Body:
ive got a next project with tailwind css. however a part of the css goes to hell during deployment, but locally its fine in Safari, in a mobile device. since i dont have an iphone i use an online emulator to simulate the error. the image below is what it looks like when deployed

however when i run it locally, as in i run localhost:3000 on the emulator. everything looks fine like so

Also, since this emulator allows me access to dev tools for which i used inspect. when i tried to turn off and on the flex css (you know when you open inspect, u see all the css styles and a checkbox to turn on or off that css). the display is perfect again! is this a bug or am i missing something?

the code i have above is a carousel and here is the code as follows, where the images i used a map function to display.

console.log(e.target.scrollLeft)}
    ref={elementRef}
    >
        {
            props.images.map(function(item){
                return

                <Image
                    src={item}
                    width={100}
                    height={500}
                    className="w-[100%] sm:object-fill sm:w-full md:max-h-[350px] sm:max-h-[300px] lg:max-h-[450px] xl:max-h-[500px]"
                    unoptimized={true}
                    />

            })
        }

i dont know whats wrong. everything works fine in chrome, but not in safari. and the part where turning on and off the flex manually fixes the display makes me think that my code isnt whats wrong.


问:
How to set the bacth size of the first gpu of Pytorch DistributedDataParallel
When I train https://github.com/NVlabs/stylegan2-ada-pytorch, the first gpu uses more graphic memory, which causes other gpus to waste graphic memory. This project uses the DistributedDataParallel. How can I independently set the batch size submitted to the first gpu?</p>


问:
How to create user pool for multi-tenant while signup with cognito using aws-sdk in Reactjs
wanted an environment to isolate tenants but for isolation single user pool doesn't work
also tried with simple signup process on role base admin and user but this doesn't reach expectations</p>


问:
WSO2 Identity Server: Sending REQUEST OBJECT from wso2 to an identity provider
i'm a little bit stuck on this matter hope somebody can provide some insight on it:

i have a scenario where authentication has to be done through 2 steps:

Authentication:

1st step federated authentication  (oidc - this results in a claims which is needed in the step below )

2nd federated authentication (oidc - which needs the attribute coming from the 1st step)

So basicly im trying to get the info from the first step into the second step via authorization code flow ofcours

I've read about request object that can be signed and in encrypted and assigned to the query parameter 'request' but i can't seem to configure it in the service provider 'local outboud authentication'

Im using WSO2 IS 6.0.0

Does any body have an insight how to tackle this challenge?

I've tried also 'additional query parameter' but that didn't help

NOTE: the info that needs to be exchange between the identity providers needs to be encrypted


问:
Implementing social logins for customer in shopify store that I created from scratch using storefront API
I have a shopify store built in nextJs app that consumes shopify storefront APIs.
I want to enable social logins for the customers in my nextJs app but I dont seem to be able to find the right APIs to implement this.

currently, we're using shopify's username and password login for customers from storefront APIs.

I have searched through multiple sites and community but couldn't find help.


问:
What does "In IP15 (invalid)" mean in tcpdump output?
While trying to debug a networking issue about a non-reachable machine with tcpdump, I am seeing some "In IP?? (invalid)" in the output. Like this:

```<code>17:51:59.267768 vlan  In  IP15 (invalid)
17:51:59.267768 vlan.777 In  IP (tos 0x0, ttl 63, id 435, offset 0, flags [DF], proto ICMP (1), length 84)
    10.78.0.133 > 10.77.3.1: ICMP echo request, id 18428, seq 1, length 64
17:51:59.267811 vlan.777 Out IP (tos 0x0, ttl 64, id 36583, offset 0, flags [none], proto ICMP (1), length 84)
    10.77.3.1 > 10.78.0.133: ICMP echo reply, id 18428, seq 1, length 64
17:51:59.267815 vlan  Out IP bad-len 0

</code>```

I've also seen IP11, IP14, in those invalid output lines. My search about them has resulted in zero results. Any idea what they are about?

Body:
While trying to debug a networking issue about a non-reachable machine with tcpdump, I am seeing some "In IP?? (invalid)" in the output. Like this:

17:51:59.267768 vlan  In  IP15 (invalid)
17:51:59.267768 vlan.777 In  IP (tos 0x0, ttl 63, id 435, offset 0, flags [DF], proto ICMP (1), length 84)
    10.78.0.133 > 10.77.3.1: ICMP echo request, id 18428, seq 1, length 64
17:51:59.267811 vlan.777 Out IP (tos 0x0, ttl 64, id 36583, offset 0, flags [none], proto ICMP (1), length 84)
    10.77.3.1 > 10.78.0.133: ICMP echo reply, id 18428, seq 1, length 64
17:51:59.267815 vlan  Out IP bad-len 0

I've also seen IP11, IP14, in those invalid output lines. My search about them has resulted in zero results. Any idea what they are about?


问:
Very slow query with PostgreSQL
```<code>I have a very serious problem with PostgreSQL 14. In practice, every 5 days or so my tables, or rather some, are corrupted. When I launch a simple query, it does not execute and it remains stuck.`enter code here`
</code>```

This DB receives many write-to's in a day.
I think the table is corrupted. I would like to know why this happens if anyone has any ideas. Thank you all in advance.
I paste here an analyze that I did where I try to get the sum of some quantities in a month,

"QUERY PLAN"
"Aggregate  (cost=109583.25..109583.26 rows=1 width=8) (actual time=138615.457..138628.145 rows=1 loops=1)"
"  ->  Gather  (cost=69650.26..109583.25 rows=2 width=0) (actual time=138569.160..138626.750 rows=17950 loops=1)"
"        Workers Planned: 2"
"        Workers Launched: 2"
"        ->  Nested Loop  (cost=68650.26..108583.05 rows=1 width=0) (actual time=138556.409..138599.546 rows=5983 loops=3)"
"              Join Filter: (m.causale_id = caus.id)"
"              Rows Removed by Join Filter: 154159"
"              ->  Parallel Hash Join  (cost=68650.26..108581.15 rows=1 width=8) (actual time=138556.373..138560.611 rows=5983 loops=3)"
"                    Hash Cond: (rmdt.rigamovimentodettaglio_id = rmd.id)"
"                    ->  Parallel Seq Scan on rigamovimentodettagliotaglia rmdt  (cost=0.00..36254.00 rows=980500 width=8) (actual time=0.006..73.938 rows=784833 loops=3)"
"                    ->  Parallel Hash  (cost=68650.24..68650.24 rows=1 width=16) (actual time=138344.297..138344.300 rows=3414 loops=3)"
"                          Buckets: 16384 (originally 1024)  Batches: 1 (originally 1)  Memory Usage: 760kB"
"                          ->  Hash Join  (cost=35906.91..68650.24 rows=1 width=16) (actual time=137726.906..137728.106 rows=3414 loops=3)"
"                                Hash Cond: (rmd.rigamovimento_id = r.id)"
"                                ->  Parallel Seq Scan on rigamovimentodettaglio rmd  (cost=0.00..29574.42 rows=845042 width=16) (actual time=0.008..42.578 rows=676262 loops=3)"
"                                ->  Hash  (cost=35906.88..35906.88 rows=2 width=16) (actual time=137605.446..137605.448 rows=9221 loops=3)"
"                                      Buckets: 16384 (originally 1024)  Batches: 1 (originally 1)  Memory Usage: 561kB"
"                                      ->  Nested Loop  (cost=0.85..35906.88 rows=2 width=16) (actual time=39.893..137593.589 rows=9221 loops=3)"
"                                            ->  Index Scan using ukm9njdtmreayrcdjfln8chor0r on movimento m  (cost=0.42..12620.62 rows=1 width=16) (actual time=0.085..32.738 rows=3290 loops=3)"
"                                                  Index Cond: ((datamovimento >= '2023-01-01'::date) AND (datamovimento <= '2023-02-01'::date))"
"                                            ->  Index Scan using uk_6iar6gjj0t1e0tq5g60a93wou on rigamovimento r  (cost=0.43..23286.12 rows=15 width=16) (actual time=18.317..41.798 rows=3 loops=9870)"
"                                                  Index Cond: (movimento_id = m.id)"
"              ->  Seq Scan on causale caus  (cost=0.00..1.40 rows=40 width=8) (actual time=0.001..0.003 rows=27 loops=17950)"
"Planning Time: 0.531 ms"
"JIT:"
"  Functions: 86"
"  Options: Inlining false, Optimization false, Expressions true, Deforming true"
"  Timing: Generation 7.836 ms, Inlining 0.000 ms, Optimization 3.694 ms, Emission 54.204 ms, Total 65.733 ms"
"Execution Time: 138630.701 ms"

```<code>this is my configuration in db:
"allow_in_place_tablespaces"    "off"
"allow_system_table_mods"   "off"
"application_name"  "pgAdmin 4 - CONN:8842897"
"archive_cleanup_command"
"archive_command"   "(disabled)"
"archive_mode"  "off"
"archive_timeout"   "0"
"array_nulls"   "on"
"authentication_timeout"    "1min"
"autovacuum"    "on"
"autovacuum_analyze_scale_factor"   "0.1"
"autovacuum_analyze_threshold"  "50"
"autovacuum_freeze_max_age" "200000000"
"autovacuum_max_workers"    "3"
"autovacuum_multixact_freeze_max_age"   "400000000"
"autovacuum_naptime"    "1min"
"autovacuum_vacuum_cost_delay"  "2ms"
"autovacuum_vacuum_cost_limit"  "-1"
"autovacuum_vacuum_insert_scale_factor" "0.2"
"autovacuum_vacuum_insert_threshold"    "1000"
"autovacuum_vacuum_scale_factor"    "0.2"
"autovacuum_vacuum_threshold"   "50"
"autovacuum_work_mem"   "-1"
"backend_flush_after"   "0"
"backslash_quote"   "safe_encoding"
"backtrace_functions"
"bgwriter_delay"    "200ms"
"bgwriter_flush_after"  "512kB"
"bgwriter_lru_maxpages" "100"
"bgwriter_lru_multiplier"   "2"
"block_size"    "8192"
"bonjour"   "off"
"bonjour_name"
"bytea_output"  "hex"
"check_function_bodies" "on"
"checkpoint_completion_target"  "0.9"
"checkpoint_flush_after"    "256kB"
"checkpoint_timeout"    "5min"
"checkpoint_warning"    "30s"
"client_connection_check_interval"  "0"
"client_encoding"   "UNICODE"
"client_min_messages"   "notice"
"cluster_name"  "14/main"
"commit_delay"  "0"
"commit_siblings"   "5"
"compute_query_id"  "auto"
"config_file"   "/etc/postgresql/14/main/postgresql.conf"
"constraint_exclusion"  "partition"
"cpu_index_tuple_cost"  "0.005"
"cpu_operator_cost" "0.0025"
"cpu_tuple_cost"    "0.01"
"cursor_tuple_fraction" "0.1"
"data_checksums"    "off"
"data_directory"    "/var/lib/postgresql/14/main"
"data_directory_mode"   "0700"
"data_sync_retry"   "off"
"DateStyle" "ISO, MDY"
"db_user_namespace" "off"
"deadlock_timeout"  "1s"
"debug_assertions"  "off"
"debug_discard_caches"  "0"
"debug_pretty_print"    "on"
"debug_print_parse" "off"
"debug_print_plan"  "off"
"debug_print_rewritten" "off"
"default_statistics_target" "100"
"default_table_access_method"   "heap"
"default_tablespace"
"default_text_search_config"    "pg_catalog.english"
"default_toast_compression" "pglz"
"default_transaction_deferrable"    "off"
"default_transaction_isolation" "read committed"
"default_transaction_read_only" "off"
"dynamic_library_path"  "$libdir"
"dynamic_shared_memory_type"    "posix"
"effective_cache_size"  "3GB"
"effective_io_concurrency"  "200"
"enable_async_append"   "on"
"enable_bitmapscan" "on"
"enable_gathermerge"    "on"
"enable_hashagg"    "on"
"enable_hashjoin"   "on"
"enable_incremental_sort"   "on"
"enable_indexonlyscan"  "on"
"enable_indexscan"  "on"
"enable_material"   "on"
"enable_memoize"    "on"
"enable_mergejoin"  "on"
"enable_nestloop"   "on"
"enable_parallel_append"    "on"
"enable_parallel_hash"  "on"
"enable_partition_pruning"  "on"
"enable_partitionwise_aggregate"    "off"
"enable_partitionwise_join" "off"
"enable_seqscan"    "on"
"enable_sort"   "on"
"enable_tidscan"    "on"
"escape_string_warning" "on"
"event_source"  "PostgreSQL"
"exit_on_error" "off"
"extension_destdir"
"external_pid_file" "/var/run/postgresql/14-main.pid"
"extra_float_digits"    "1"
"force_parallel_mode"   "off"
"from_collapse_limit"   "8"
"fsync" "on"
"full_page_writes"  "on"
"geqo"  "on"
"geqo_effort"   "5"
"geqo_generations"  "0"
"geqo_pool_size"    "0"
"geqo_seed" "0"
"geqo_selection_bias"   "2"
"geqo_threshold"    "12"
"gin_fuzzy_search_limit"    "0"
"gin_pending_list_limit"    "4MB"
"hash_mem_multiplier"   "1"
"hba_file"  "/etc/postgresql/14/main/pg_hba.conf"
"hot_standby"   "on"
"hot_standby_feedback"  "off"
"huge_page_size"    "0"
"huge_pages"    "try"
"ident_file"    "/etc/postgresql/14/main/pg_ident.conf"
"idle_in_transaction_session_timeout"   "0"
"idle_session_timeout"  "0"
"ignore_checksum_failure"   "off"
"ignore_invalid_pages"  "off"
"ignore_system_indexes" "off"
"in_hot_standby"    "off"
"integer_datetimes" "on"
"IntervalStyle" "postgres"
"jit"   "on"
"jit_above_cost"    "100000"
"jit_debugging_support" "off"
"jit_dump_bitcode"  "off"
"jit_expressions"   "on"
"jit_inline_above_cost" "500000"
"jit_optimize_above_cost"   "500000"
"jit_profiling_support" "off"
"jit_provider"  "llvmjit"
"jit_tuple_deforming"   "on"
"join_collapse_limit"   "8"
"krb_caseins_users" "off"
"krb_server_keyfile"    "FILE:/etc/postgresql-common/krb5.keytab"
"lc_collate"    "C.UTF-8"
"lc_ctype"  "C.UTF-8"
"lc_messages"   "C.UTF-8"
"lc_monetary"   "C.UTF-8"
"lc_numeric"    "C.UTF-8"
"lc_time"   "C.UTF-8"
"listen_addresses"  "*"
"lo_compat_privileges"  "off"
"local_preload_libraries"
"lock_timeout"  "0"
"log_autovacuum_min_duration"   "-1"
"log_checkpoints"   "off"
"log_connections"   "off"
"log_destination"   "stderr"
"log_directory" "log"
"log_disconnections"    "off"
"log_duration"  "off"
"log_error_verbosity"   "default"
"log_executor_stats"    "off"
"log_file_mode" "0600"
"log_filename"  "postgresql-%Y-%m-%d_%H%M%S.log"
"log_hostname"  "off"
"log_line_prefix"   "%m [%p] %q%u@%d "
"log_lock_waits"    "off"
"log_min_duration_sample"   "-1"
"log_min_duration_statement"    "-1"
"log_min_error_statement"   "error"
"log_min_messages"  "warning"
"log_parameter_max_length"  "-1"
"log_parameter_max_length_on_error" "0"
"log_parser_stats"  "off"
"log_planner_stats" "off"
"log_recovery_conflict_waits"   "off"
"log_replication_commands"  "off"
"log_rotation_age"  "1d"
"log_rotation_size" "10MB"
"log_statement" "none"
"log_statement_sample_rate" "1"
"log_statement_stats"   "off"
"log_temp_files"    "-1"
"log_timezone"  "Europe/Rome"
"log_transaction_sample_rate"   "0"
"log_truncate_on_rotation"  "off"
"logging_collector" "off"
"logical_decoding_work_mem" "64MB"
"maintenance_io_concurrency"    "10"
"maintenance_work_mem"  "512MB"
"max_connections"   "200"
"max_files_per_process" "1000"
"max_function_args" "100"
"max_identifier_length" "63"
"max_index_keys"    "32"
"max_locks_per_transaction" "64"
"max_logical_replication_workers"   "4"
"max_parallel_maintenance_workers"  "2"
"max_parallel_workers"  "4"
"max_parallel_workers_per_gather"   "2"
"max_pred_locks_per_page"   "2"
"max_pred_locks_per_relation"   "-2"
"max_pred_locks_per_transaction"    "64"
"max_prepared_transactions" "0"
"max_replication_slots" "10"
"max_slot_wal_keep_size"    "-1"
"max_stack_depth"   "2MB"
"max_standby_archive_delay" "30s"
"max_standby_streaming_delay"   "30s"
"max_sync_workers_per_subscription" "2"
"max_wal_senders"   "10"
"max_wal_size"  "4GB"
"max_worker_processes"  "4"
"min_dynamic_shared_memory" "0"
"min_parallel_index_scan_size"  "512kB"
"min_parallel_table_scan_size"  "8MB"
"min_wal_size"  "1GB"
"old_snapshot_threshold"    "-1"
"parallel_leader_participation" "on"
"parallel_setup_cost"   "1000"
"parallel_tuple_cost"   "0.1"
"password_encryption"   "scram-sha-256"
"plan_cache_mode"   "auto"
"port"  "5432"
"post_auth_delay"   "0"
"pre_auth_delay"    "0"
"primary_conninfo"
"primary_slot_name"
"promote_trigger_file"
"quote_all_identifiers" "off"
"random_page_cost"  "1.1"
"recovery_end_command"
"recovery_init_sync_method" "fsync"
"recovery_min_apply_delay"  "0"
"recovery_target"
"recovery_target_action"    "pause"
"recovery_target_inclusive" "on"
"recovery_target_lsn"
"recovery_target_name"
"recovery_target_time"
"recovery_target_timeline"  "latest"
"recovery_target_xid"
"remove_temp_files_after_crash" "on"
"restart_after_crash"   "on"
"restore_command"
"row_security"  "on"
"search_path"   """$user"", public"
"segment_size"  "1GB"
"seq_page_cost" "1"
"server_encoding"   "UTF8"
"server_version"    "14.6 (Ubuntu 14.6-1.pgdg18.04+1)"
"server_version_num"    "140006"
"session_preload_libraries"
"session_replication_role"  "origin"
"shared_buffers"    "1GB"
"shared_memory_type"    "mmap"
"shared_preload_libraries"
"ssl"   "on"
"ssl_ca_file"
"ssl_cert_file" "/etc/ssl/certs/ssl-cert-snakeoil.pem"
"ssl_ciphers"   "HIGH:MEDIUM:+3DES:!aNULL"
"ssl_crl_dir"
"ssl_crl_file"
"ssl_dh_params_file"
"ssl_ecdh_curve"    "prime256v1"
"ssl_key_file"  "/etc/ssl/private/ssl-cert-snakeoil.key"
"ssl_library"   "OpenSSL"
"ssl_max_protocol_version"
"ssl_min_protocol_version"  "TLSv1.2"
"ssl_passphrase_command"
"ssl_passphrase_command_supports_reload"    "off"
"ssl_prefer_server_ciphers" "on"
"standard_conforming_strings"   "on"
"statement_timeout" "0"
"stats_temp_directory"  "/var/run/postgresql/14-main.pg_stat_tmp"
"superuser_reserved_connections"    "3"
"synchronize_seqscans"  "on"
"synchronous_commit"    "on"
"synchronous_standby_names"
"syslog_facility"   "local0"
"syslog_ident"  "postgres"
"syslog_sequence_numbers"   "on"
"syslog_split_messages" "on"
"tcp_keepalives_count"  "9"
"tcp_keepalives_idle"   "7200"
"tcp_keepalives_interval"   "75"
"tcp_user_timeout"  "0"
"temp_buffers"  "8MB"
"temp_file_limit"   "-1"
"temp_tablespaces"
"TimeZone"  "Europe/Rome"
"timezone_abbreviations"    "Default"
"trace_notify"  "off"
"trace_recovery_messages"   "log"
"trace_sort"    "off"
"track_activities"  "on"
"track_activity_query_size" "1kB"
"track_commit_timestamp"    "off"
"track_counts"  "on"
"track_functions"   "none"
"track_io_timing"   "off"
"track_wal_io_timing"   "off"
"transaction_deferrable"    "off"
"transaction_isolation" "read committed"
"transaction_read_only" "off"
"transform_null_equals" "off"
"unix_socket_directories"   "/var/run/postgresql"
"unix_socket_group"
"unix_socket_permissions"   "0777"
"update_process_title"  "on"
"vacuum_cost_delay" "0"
"vacuum_cost_limit" "200"
"vacuum_cost_page_dirty"    "20"
"vacuum_cost_page_hit"  "1"
"vacuum_cost_page_miss" "2"
"vacuum_defer_cleanup_age"  "0"
"vacuum_failsafe_age"   "1600000000"
"vacuum_freeze_min_age" "50000000"
"vacuum_freeze_table_age"   "150000000"
"vacuum_multixact_failsafe_age" "1600000000"
"vacuum_multixact_freeze_min_age"   "5000000"
"vacuum_multixact_freeze_table_age" "150000000"
"wal_block_size"    "8192"
"wal_buffers"   "16MB"
"wal_compression"   "off"
"wal_consistency_checking"
"wal_init_zero" "on"
"wal_keep_size" "0"
"wal_level" "replica"
"wal_log_hints" "off"
"wal_receiver_create_temp_slot" "off"
"wal_receiver_status_interval"  "10s"
"wal_receiver_timeout"  "1min"
"wal_recycle"   "on"
"wal_retrieve_retry_interval"   "5s"
"wal_segment_size"  "16MB"
"wal_sender_timeout"    "1min"
"wal_skip_threshold"    "2MB"
"wal_sync_method"   "fdatasync"
"wal_writer_delay"  "200ms"
"wal_writer_flush_after"    "1MB"
"work_mem"  "2621kB"
"xmlbinary" "base64"
"xmloption" "content"
"zero_damaged_pages"    "off"
</code>```

Title: Very slow query with PostgreSQL

Body:
I have a very serious problem with PostgreSQL 14. In practice, every 5 days or so my tables, or rather some, are corrupted. When I launch a simple query, it does not execute and it remains stuck.`enter code here`

This DB receives many write-to's in a day.
I think the table is corrupted. I would like to know why this happens if anyone has any ideas. Thank you all in advance.
I paste here an analyze that I did where I try to get the sum of some quantities in a month,

"QUERY PLAN"
"Aggregate  (cost=109583.25..109583.26 rows=1 width=8) (actual time=138615.457..138628.145 rows=1 loops=1)"
"  ->  Gather  (cost=69650.26..109583.25 rows=2 width=0) (actual time=138569.160..138626.750 rows=17950 loops=1)"
"        Workers Planned: 2"
"        Workers Launched: 2"
"        ->  Nested Loop  (cost=68650.26..108583.05 rows=1 width=0) (actual time=138556.409..138599.546 rows=5983 loops=3)"
"              Join Filter: (m.causale_id = caus.id)"
"              Rows Removed by Join Filter: 154159"
"              ->  Parallel Hash Join  (cost=68650.26..108581.15 rows=1 width=8) (actual time=138556.373..138560.611 rows=5983 loops=3)"
"                    Hash Cond: (rmdt.rigamovimentodettaglio_id = rmd.id)"
"                    ->  Parallel Seq Scan on rigamovimentodettagliotaglia rmdt  (cost=0.00..36254.00 rows=980500 width=8) (actual time=0.006..73.938 rows=784833 loops=3)"
"                    ->  Parallel Hash  (cost=68650.24..68650.24 rows=1 width=16) (actual time=138344.297..138344.300 rows=3414 loops=3)"
"                          Buckets: 16384 (originally 1024)  Batches: 1 (originally 1)  Memory Usage: 760kB"
"                          ->  Hash Join  (cost=35906.91..68650.24 rows=1 width=16) (actual time=137726.906..137728.106 rows=3414 loops=3)"
"                                Hash Cond: (rmd.rigamovimento_id = r.id)"
"                                ->  Parallel Seq Scan on rigamovimentodettaglio rmd  (cost=0.00..29574.42 rows=845042 width=16) (actual time=0.008..42.578 rows=676262 loops=3)"
"                                ->  Hash  (cost=35906.88..35906.88 rows=2 width=16) (actual time=137605.446..137605.448 rows=9221 loops=3)"
"                                      Buckets: 16384 (originally 1024)  Batches: 1 (originally 1)  Memory Usage: 561kB"
"                                      ->  Nested Loop  (cost=0.85..35906.88 rows=2 width=16) (actual time=39.893..137593.589 rows=9221 loops=3)"
"                                            ->  Index Scan using ukm9njdtmreayrcdjfln8chor0r on movimento m  (cost=0.42..12620.62 rows=1 width=16) (actual time=0.085..32.738 rows=3290 loops=3)"
"                                                  Index Cond: ((datamovimento >= '2023-01-01'::date) AND (datamovimento <= '2023-02-01'::date))"
"                                            ->  Index Scan using uk_6iar6gjj0t1e0tq5g60a93wou on rigamovimento r  (cost=0.43..23286.12 rows=15 width=16) (actual time=18.317..41.798 rows=3 loops=9870)"
"                                                  Index Cond: (movimento_id = m.id)"
"              ->  Seq Scan on causale caus  (cost=0.00..1.40 rows=40 width=8) (actual time=0.001..0.003 rows=27 loops=17950)"
"Planning Time: 0.531 ms"
"JIT:"
"  Functions: 86"
"  Options: Inlining false, Optimization false, Expressions true, Deforming true"
"  Timing: Generation 7.836 ms, Inlining 0.000 ms, Optimization 3.694 ms, Emission 54.204 ms, Total 65.733 ms"
"Execution Time: 138630.701 ms"

this is my configuration in db:
"allow_in_place_tablespaces"    "off"
"allow_system_table_mods"   "off"
"application_name"  "pgAdmin 4 - CONN:8842897"
"archive_cleanup_command"
"archive_command"   "(disabled)"
"archive_mode"  "off"
"archive_timeout"   "0"
"array_nulls"   "on"
"authentication_timeout"    "1min"
"autovacuum"    "on"
"autovacuum_analyze_scale_factor"   "0.1"
"autovacuum_analyze_threshold"  "50"
"autovacuum_freeze_max_age" "200000000"
"autovacuum_max_workers"    "3"
"autovacuum_multixact_freeze_max_age"   "400000000"
"autovacuum_naptime"    "1min"
"autovacuum_vacuum_cost_delay"  "2ms"
"autovacuum_vacuum_cost_limit"  "-1"
"autovacuum_vacuum_insert_scale_factor" "0.2"
"autovacuum_vacuum_insert_threshold"    "1000"
"autovacuum_vacuum_scale_factor"    "0.2"
"autovacuum_vacuum_threshold"   "50"
"autovacuum_work_mem"   "-1"
"backend_flush_after"   "0"
"backslash_quote"   "safe_encoding"
"backtrace_functions"
"bgwriter_delay"    "200ms"
"bgwriter_flush_after"  "512kB"
"bgwriter_lru_maxpages" "100"
"bgwriter_lru_multiplier"   "2"
"block_size"    "8192"
"bonjour"   "off"
"bonjour_name"
"bytea_output"  "hex"
"check_function_bodies" "on"
"checkpoint_completion_target"  "0.9"
"checkpoint_flush_after"    "256kB"
"checkpoint_timeout"    "5min"
"checkpoint_warning"    "30s"
"client_connection_check_interval"  "0"
"client_encoding"   "UNICODE"
"client_min_messages"   "notice"
"cluster_name"  "14/main"
"commit_delay"  "0"
"commit_siblings"   "5"
"compute_query_id"  "auto"
"config_file"   "/etc/postgresql/14/main/postgresql.conf"
"constraint_exclusion"  "partition"
"cpu_index_tuple_cost"  "0.005"
"cpu_operator_cost" "0.0025"
"cpu_tuple_cost"    "0.01"
"cursor_tuple_fraction" "0.1"
"data_checksums"    "off"
"data_directory"    "/var/lib/postgresql/14/main"
"data_directory_mode"   "0700"
"data_sync_retry"   "off"
"DateStyle" "ISO, MDY"
"db_user_namespace" "off"
"deadlock_timeout"  "1s"
"debug_assertions"  "off"
"debug_discard_caches"  "0"
"debug_pretty_print"    "on"
"debug_print_parse" "off"
"debug_print_plan"  "off"
"debug_print_rewritten" "off"
"default_statistics_target" "100"
"default_table_access_method"   "heap"
"default_tablespace"
"default_text_search_config"    "pg_catalog.english"
"default_toast_compression" "pglz"
"default_transaction_deferrable"    "off"
"default_transaction_isolation" "read committed"
"default_transaction_read_only" "off"
"dynamic_library_path"  "$libdir"
"dynamic_shared_memory_type"    "posix"
"effective_cache_size"  "3GB"
"effective_io_concurrency"  "200"
"enable_async_append"   "on"
"enable_bitmapscan" "on"
"enable_gathermerge"    "on"
"enable_hashagg"    "on"
"enable_hashjoin"   "on"
"enable_incremental_sort"   "on"
"enable_indexonlyscan"  "on"
"enable_indexscan"  "on"
"enable_material"   "on"
"enable_memoize"    "on"
"enable_mergejoin"  "on"
"enable_nestloop"   "on"
"enable_parallel_append"    "on"
"enable_parallel_hash"  "on"
"enable_partition_pruning"  "on"
"enable_partitionwise_aggregate"    "off"
"enable_partitionwise_join" "off"
"enable_seqscan"    "on"
"enable_sort"   "on"
"enable_tidscan"    "on"
"escape_string_warning" "on"
"event_source"  "PostgreSQL"
"exit_on_error" "off"
"extension_destdir"
"external_pid_file" "/var/run/postgresql/14-main.pid"
"extra_float_digits"    "1"
"force_parallel_mode"   "off"
"from_collapse_limit"   "8"
"fsync" "on"
"full_page_writes"  "on"
"geqo"  "on"
"geqo_effort"   "5"
"geqo_generations"  "0"
"geqo_pool_size"    "0"
"geqo_seed" "0"
"geqo_selection_bias"   "2"
"geqo_threshold"    "12"
"gin_fuzzy_search_limit"    "0"
"gin_pending_list_limit"    "4MB"
"hash_mem_multiplier"   "1"
"hba_file"  "/etc/postgresql/14/main/pg_hba.conf"
"hot_standby"   "on"
"hot_standby_feedback"  "off"
"huge_page_size"    "0"
"huge_pages"    "try"
"ident_file"    "/etc/postgresql/14/main/pg_ident.conf"
"idle_in_transaction_session_timeout"   "0"
"idle_session_timeout"  "0"
"ignore_checksum_failure"   "off"
"ignore_invalid_pages"  "off"
"ignore_system_indexes" "off"
"in_hot_standby"    "off"
"integer_datetimes" "on"
"IntervalStyle" "postgres"
"jit"   "on"
"jit_above_cost"    "100000"
"jit_debugging_support" "off"
"jit_dump_bitcode"  "off"
"jit_expressions"   "on"
"jit_inline_above_cost" "500000"
"jit_optimize_above_cost"   "500000"
"jit_profiling_support" "off"
"jit_provider"  "llvmjit"
"jit_tuple_deforming"   "on"
"join_collapse_limit"   "8"
"krb_caseins_users" "off"
"krb_server_keyfile"    "FILE:/etc/postgresql-common/krb5.keytab"
"lc_collate"    "C.UTF-8"
"lc_ctype"  "C.UTF-8"
"lc_messages"   "C.UTF-8"
"lc_monetary"   "C.UTF-8"
"lc_numeric"    "C.UTF-8"
"lc_time"   "C.UTF-8"
"listen_addresses"  "*"
"lo_compat_privileges"  "off"
"local_preload_libraries"
"lock_timeout"  "0"
"log_autovacuum_min_duration"   "-1"
"log_checkpoints"   "off"
"log_connections"   "off"
"log_destination"   "stderr"
"log_directory" "log"
"log_disconnections"    "off"
"log_duration"  "off"
"log_error_verbosity"   "default"
"log_executor_stats"    "off"
"log_file_mode" "0600"
"log_filename"  "postgresql-%Y-%m-%d_%H%M%S.log"
"log_hostname"  "off"
"log_line_prefix"   "%m [%p] %q%u@%d "
"log_lock_waits"    "off"
"log_min_duration_sample"   "-1"
"log_min_duration_statement"    "-1"
"log_min_error_statement"   "error"
"log_min_messages"  "warning"
"log_parameter_max_length"  "-1"
"log_parameter_max_length_on_error" "0"
"log_parser_stats"  "off"
"log_planner_stats" "off"
"log_recovery_conflict_waits"   "off"
"log_replication_commands"  "off"
"log_rotation_age"  "1d"
"log_rotation_size" "10MB"
"log_statement" "none"
"log_statement_sample_rate" "1"
"log_statement_stats"   "off"
"log_temp_files"    "-1"
"log_timezone"  "Europe/Rome"
"log_transaction_sample_rate"   "0"
"log_truncate_on_rotation"  "off"
"logging_collector" "off"
"logical_decoding_work_mem" "64MB"
"maintenance_io_concurrency"    "10"
"maintenance_work_mem"  "512MB"
"max_connections"   "200"
"max_files_per_process" "1000"
"max_function_args" "100"
"max_identifier_length" "63"
"max_index_keys"    "32"
"max_locks_per_transaction" "64"
"max_logical_replication_workers"   "4"
"max_parallel_maintenance_workers"  "2"
"max_parallel_workers"  "4"
"max_parallel_workers_per_gather"   "2"
"max_pred_locks_per_page"   "2"
"max_pred_locks_per_relation"   "-2"
"max_pred_locks_per_transaction"    "64"
"max_prepared_transactions" "0"
"max_replication_slots" "10"
"max_slot_wal_keep_size"    "-1"
"max_stack_depth"   "2MB"
"max_standby_archive_delay" "30s"
"max_standby_streaming_delay"   "30s"
"max_sync_workers_per_subscription" "2"
"max_wal_senders"   "10"
"max_wal_size"  "4GB"
"max_worker_processes"  "4"
"min_dynamic_shared_memory" "0"
"min_parallel_index_scan_size"  "512kB"
"min_parallel_table_scan_size"  "8MB"
"min_wal_size"  "1GB"
"old_snapshot_threshold"    "-1"
"parallel_leader_participation" "on"
"parallel_setup_cost"   "1000"
"parallel_tuple_cost"   "0.1"
"password_encryption"   "scram-sha-256"
"plan_cache_mode"   "auto"
"port"  "5432"
"post_auth_delay"   "0"
"pre_auth_delay"    "0"
"primary_conninfo"
"primary_slot_name"
"promote_trigger_file"
"quote_all_identifiers" "off"
"random_page_cost"  "1.1"
"recovery_end_command"
"recovery_init_sync_method" "fsync"
"recovery_min_apply_delay"  "0"
"recovery_target"
"recovery_target_action"    "pause"
"recovery_target_inclusive" "on"
"recovery_target_lsn"
"recovery_target_name"
"recovery_target_time"
"recovery_target_timeline"  "latest"
"recovery_target_xid"
"remove_temp_files_after_crash" "on"
"restart_after_crash"   "on"
"restore_command"
"row_security"  "on"
"search_path"   """$user"", public"
"segment_size"  "1GB"
"seq_page_cost" "1"
"server_encoding"   "UTF8"
"server_version"    "14.6 (Ubuntu 14.6-1.pgdg18.04+1)"
"server_version_num"    "140006"
"session_preload_libraries"
"session_replication_role"  "origin"
"shared_buffers"    "1GB"
"shared_memory_type"    "mmap"
"shared_preload_libraries"
"ssl"   "on"
"ssl_ca_file"
"ssl_cert_file" "/etc/ssl/certs/ssl-cert-snakeoil.pem"
"ssl_ciphers"   "HIGH:MEDIUM:+3DES:!aNULL"
"ssl_crl_dir"
"ssl_crl_file"
"ssl_dh_params_file"
"ssl_ecdh_curve"    "prime256v1"
"ssl_key_file"  "/etc/ssl/private/ssl-cert-snakeoil.key"
"ssl_library"   "OpenSSL"
"ssl_max_protocol_version"
"ssl_min_protocol_version"  "TLSv1.2"
"ssl_passphrase_command"
"ssl_passphrase_command_supports_reload"    "off"
"ssl_prefer_server_ciphers" "on"
"standard_conforming_strings"   "on"
"statement_timeout" "0"
"stats_temp_directory"  "/var/run/postgresql/14-main.pg_stat_tmp"
"superuser_reserved_connections"    "3"
"synchronize_seqscans"  "on"
"synchronous_commit"    "on"
"synchronous_standby_names"
"syslog_facility"   "local0"
"syslog_ident"  "postgres"
"syslog_sequence_numbers"   "on"
"syslog_split_messages" "on"
"tcp_keepalives_count"  "9"
"tcp_keepalives_idle"   "7200"
"tcp_keepalives_interval"   "75"
"tcp_user_timeout"  "0"
"temp_buffers"  "8MB"
"temp_file_limit"   "-1"
"temp_tablespaces"
"TimeZone"  "Europe/Rome"
"timezone_abbreviations"    "Default"
"trace_notify"  "off"
"trace_recovery_messages"   "log"
"trace_sort"    "off"
"track_activities"  "on"
"track_activity_query_size" "1kB"
"track_commit_timestamp"    "off"
"track_counts"  "on"
"track_functions"   "none"
"track_io_timing"   "off"
"track_wal_io_timing"   "off"
"transaction_deferrable"    "off"
"transaction_isolation" "read committed"
"transaction_read_only" "off"
"transform_null_equals" "off"
"unix_socket_directories"   "/var/run/postgresql"
"unix_socket_group"
"unix_socket_permissions"   "0777"
"update_process_title"  "on"
"vacuum_cost_delay" "0"
"vacuum_cost_limit" "200"
"vacuum_cost_page_dirty"    "20"
"vacuum_cost_page_hit"  "1"
"vacuum_cost_page_miss" "2"
"vacuum_defer_cleanup_age"  "0"
"vacuum_failsafe_age"   "1600000000"
"vacuum_freeze_min_age" "50000000"
"vacuum_freeze_table_age"   "150000000"
"vacuum_multixact_failsafe_age" "1600000000"
"vacuum_multixact_freeze_min_age"   "5000000"
"vacuum_multixact_freeze_table_age" "150000000"
"wal_block_size"    "8192"
"wal_buffers"   "16MB"
"wal_compression"   "off"
"wal_consistency_checking"
"wal_init_zero" "on"
"wal_keep_size" "0"
"wal_level" "replica"
"wal_log_hints" "off"
"wal_receiver_create_temp_slot" "off"
"wal_receiver_status_interval"  "10s"
"wal_receiver_timeout"  "1min"
"wal_recycle"   "on"
"wal_retrieve_retry_interval"   "5s"
"wal_segment_size"  "16MB"
"wal_sender_timeout"    "1min"
"wal_skip_threshold"    "2MB"
"wal_sync_method"   "fdatasync"
"wal_writer_delay"  "200ms"
"wal_writer_flush_after"    "1MB"
"work_mem"  "2621kB"
"xmlbinary" "base64"
"xmloption" "content"
"zero_damaged_pages"    "off"


问:
How do I find out which RPubs account my RStudio is linked to?
I published an R-Markdown file recently.

When I go to my RPubs page, the markdown file isn't there.

For anyone more familiar with these things, and R in general, do y'all happen to know what might've went wrong?


问:
NestJS Entity class - 'methodname' is not a function
I'm tackling a NestJS course and it's just a bit outdated and at the moment the requirement is to have a "Create" method on the entity class, I can see that the instructor is able to have it functioning but I keep getting an error.

```<code>@Entity()
@Unique('task_index_uq', ['title'])
export class Task extends Repository<Task> {
  @PrimaryGeneratedColumn('uuid')
  id: string;

  @Column()
  title: string;

  @Column()
  description: string;

  @Column()
  status: TaskStatus;

  async createTask(createTaskDto: CreateTaskDto): Promise<Task> {
    const { title, description } = createTaskDto;

    const task = this.create({
      title,
      description,
      status: TaskStatus.OPEN,
    });

    await this.save(task);
    return task;
  }
}
</code>```

What could be the problem?

Body:
I'm tackling a NestJS course and it's just a bit outdated and at the moment the requirement is to have a "Create" method on the entity class, I can see that the instructor is able to have it functioning but I keep getting an error.

@Entity()
@Unique('task_index_uq', ['title'])
export class Task extends Repository<Task> {
  @PrimaryGeneratedColumn('uuid')
  id: string;

  @Column()
  title: string;

  @Column()
  description: string;

  @Column()
  status: TaskStatus;

  async createTask(createTaskDto: CreateTaskDto): Promise<Task> {
    const { title, description } = createTaskDto;

    const task = this.create({
      title,
      description,
      status: TaskStatus.OPEN,
    });

    await this.save(task);
    return task;
  }
}

What could be the problem?


问:
Hunspell Dictionary Config for AWS Elasticsearch
I am trying to install Hunspell Stemming Dictionaries for AWS ElasticSearch v7.10

I have done this previously for a classic unix install of ElasticSearch, which involved unzipping the latest .oxt dictionary file

https://extensions.libreoffice.org/en/extensions/show/english-dictionaries

https://extensions.libreoffice.org/assets/downloads/41/1669872021/dict-en-20221201_lo.oxt

Copying these files to the expected filesystem path:

./config/hunspell/{lang}/{lang}.aff + {lang}.dic

The difference is that AWS ElasticSearch doesn't have backend filesystem. I have assumed we are supposed use S3 instead. I have created a bucket with this file layout and think I have successfully given it public read-only permissions.

s3://hunspell/

http://hunspell.s3-website.eu-west-2.amazonaws.com/

My ElasticSearch schema contains the following analyser

```<code>{
  "settings": {
    "analysis": {
      "analyzer": {

        //***** Stemmers *****//
        // DOCS: https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-hunspell-tokenfilter.html
        "hunspell_stemmer_en_GB": {
          "type":   "hunspell",
          "locale": "en_GB",
          "dedup":  true,
          "ignore_case": true,
          "dictionary": [
            "s3://hunspell/en_GB/en_GB.aff",
            "s3://hunspell/en_GB/en_GB.dic",
          ]
        }
     }
  }
}
</code>```

But mapping PUT command is still returning the following exception

```<code>"type": "illegal_state_exception",
"reason": "failed to load hunspell dictionary for locale: en_GB",
"caused_by": {
"type": "exception",
  "reason": "Could not find hunspell dictionary [en_GB]"
}
</code>```

How do I configure Hunspell for AWS ElasticSearch?

Body:
I am trying to install Hunspell Stemming Dictionaries for AWS ElasticSearch v7.10

I have done this previously for a classic unix install of ElasticSearch, which involved unzipping the latest .oxt dictionary file

https://extensions.libreoffice.org/en/extensions/show/english-dictionaries

https://extensions.libreoffice.org/assets/downloads/41/1669872021/dict-en-20221201_lo.oxt

Copying these files to the expected filesystem path:

./config/hunspell/{lang}/{lang}.aff + {lang}.dic

The difference is that AWS ElasticSearch doesn't have backend filesystem. I have assumed we are supposed use S3 instead. I have created a bucket with this file layout and think I have successfully given it public read-only permissions.

s3://hunspell/

http://hunspell.s3-website.eu-west-2.amazonaws.com/

My ElasticSearch schema contains the following analyser

{
  "settings": {
    "analysis": {
      "analyzer": {

        //***** Stemmers *****//
        // DOCS: https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-hunspell-tokenfilter.html
        "hunspell_stemmer_en_GB": {
          "type":   "hunspell",
          "locale": "en_GB",
          "dedup":  true,
          "ignore_case": true,
          "dictionary": [
            "s3://hunspell/en_GB/en_GB.aff",
            "s3://hunspell/en_GB/en_GB.dic",
          ]
        }
     }
  }
}

But mapping PUT command is still returning the following exception

"type": "illegal_state_exception",
"reason": "failed to load hunspell dictionary for locale: en_GB",
"caused_by": {
"type": "exception",
  "reason": "Could not find hunspell dictionary [en_GB]"
}

How do I configure Hunspell for AWS ElasticSearch?


问:
TypeError: Cannot read properties of undefined (reading 'push')
The problem I'm having is that it's not redirecting me to the screen specified on line 54 this.props.history.push('/'); because the following message appears in the console:

```<code>TypeError: Cannot read properties of undefined (reading 'push')
    at Login.js:54:1
</code>```
```<code>import { Avatar, Container, Typography, Button, TextField } from '@material-ui/core';
import React, { Component } from 'react';
import LockOutlineIcon from "@material-ui/icons/LockOutlined";
import { compose } from 'recompose';
import { consumerFirebase } from '../../server';

const style={
    paper: {
        marginTop: 9,
        display: "flex",
        flexDirection: "column",
        alignItems: "center"
    },
    avatar: {
        margin: 5,
        backgroundColor: "red"
    },
    form : {
        width : "100%",
        marginTop : 8
    }

}

class Login extends Component {
    state = {
        firebase : null,
        usuario : {
            email : '',
            password : ''
        }
    }
    static getDerivedStateFromProps(nextProps, prevState){
        if(nextProps.firebase === prevState.firebase){
            return null;
        }
        return {
            firebase : nextProps.firebase
        }
    }
    onChange = e => {
        let usuario = Object.assign({}, this.state.usuario);
        usuario[e.target.name] = e.target.value;
        this.setState({
            usuario : usuario
        })
    }
    login = e =>{
        e.preventDefault();
        const { firebase, usuario } = this.state;
        firebase.auth
        .signInWithEmailAndPassword(usuario.email, usuario.password)
        .then( auth => {
            this.props.history.push('/');
        })
        .catch(error => {
            console.log(error);
        })
    }

    render() {
        return (
                <Container maxWidth="xs" >
                <div style={style.paper} >
                    <Avatar style={style.avatar} >
                        <LockOutlineIcon />
                    </Avatar>
                    <Typography component="h1" variant="h5" >
                        Ingrese usuario
                    </Typography>
                    <form style={style.form} >
                        <TextField
                            variant="outlined"
                            label="E-Mail"
                            name="email"
                            fullWidth
                            margin="normal"
                            onChange={this.onChange}
                            value = {this.state.usuario.email}
                        />
                        <TextField
                            variant="outlined"
                            label="Password"
                            type="password"
                            name="password"
                            fullWidth
                            margin="normal"
                            onChange={this.onChange}
                            value = {this.state.usuario.password}
                        />
                        <Button
                            type='submit'
                            fullWidth
                            variant='contained'
                            color="primary"
                            onClick={this.login}
                        >
                            Enviar
                        </Button>
                    </form>
                </div>
                </Container>
        );
    }
}

export default compose(consumerFirebase) (Login);
</code>```

Body:
The problem I'm having is that it's not redirecting me to the screen specified on line 54 this.props.history.push('/'); because the following message appears in the console:

TypeError: Cannot read properties of undefined (reading 'push')
    at Login.js:54:1

import { Avatar, Container, Typography, Button, TextField } from '@material-ui/core';
import React, { Component } from 'react';
import LockOutlineIcon from "@material-ui/icons/LockOutlined";
import { compose } from 'recompose';
import { consumerFirebase } from '../../server';

const style={
    paper: {
        marginTop: 9,
        display: "flex",
        flexDirection: "column",
        alignItems: "center"
    },
    avatar: {
        margin: 5,
        backgroundColor: "red"
    },
    form : {
        width : "100%",
        marginTop : 8
    }

}

class Login extends Component {
    state = {
        firebase : null,
        usuario : {
            email : '',
            password : ''
        }
    }
    static getDerivedStateFromProps(nextProps, prevState){
        if(nextProps.firebase === prevState.firebase){
            return null;
        }
        return {
            firebase : nextProps.firebase
        }
    }
    onChange = e => {
        let usuario = Object.assign({}, this.state.usuario);
        usuario[e.target.name] = e.target.value;
        this.setState({
            usuario : usuario
        })
    }
    login = e =>{
        e.preventDefault();
        const { firebase, usuario } = this.state;
        firebase.auth
        .signInWithEmailAndPassword(usuario.email, usuario.password)
        .then( auth => {
            this.props.history.push('/');
        })
        .catch(error => {
            console.log(error);
        })
    }

    render() {
        return (
                <Container maxWidth="xs" >

                    <Avatar style={style.avatar} >
                        <LockOutlineIcon />
                    </Avatar>
                    <Typography component="h1" variant="h5" >
                        Ingrese usuario
                    </Typography>
                    <form style={style.form} >
                        <TextField
                            variant="outlined"
                            label="E-Mail"
                            name="email"
                            fullWidth
                            margin="normal"
                            onChange={this.onChange}
                            value = {this.state.usuario.email}
                        />
                        <TextField
                            variant="outlined"
                            label="Password"
                            type="password"
                            name="password"
                            fullWidth
                            margin="normal"
                            onChange={this.onChange}
                            value = {this.state.usuario.password}
                        />
                        <Button
                            type='submit'
                            fullWidth
                            variant='contained'
                            color="primary"
                            onClick={this.login}
                        >
                            Enviar
                        </Button>
                    </form>

                </Container>
        );
    }
}

export default compose(consumerFirebase) (Login);


问:
How to scroll QChart
I am creating a plotting application with QCharts.

I have realtime data, so I need to periodically update the chart.
I use QCharts::scroll function, but it does not seem to be working.
For example scroll(100.0, 0) shifts only 0.84 on the x-axis.

What am I doing wrong ?

Here is documentation for the method: https://doc.qt.io/qt-5/qchart.html#scroll

Thank you very much

Title: How to scroll QChart


问:
How do I mock a method that uses requests.get with the WITH keyword in my class?
I am having trouble understanding how mocking works when the get responses involve using the with keyword. Here is an example I am following for my class `Album' and I have been successful when I am mocking a url as seen below:

```<code>def find_album_by_id(id):
    url = f'https://jsonplaceholder.typicode.com/albums/{id}'
    response = requests.get(url)
    if response.status_code == 200:
        return response.json()['title']
    else:
        return None
</code>```

Here the test

```<code>class TestAlbum(unittest.TestCase):

    @patch('album.requests')
    def test_find_album_by_id_success(self, mock_requests):
        # mock the response
        mock_response = MagicMock()
        mock_response.status_code = 200
        mock_response.json.return_value = {
            'userId': 1,
            'id': 1,
            'title': 'hello',
        }

        # specify the return value of the get() method
        mock_requests.get.return_value = mock_response

        # call the find_album_by_id and test if the title is 'hello'
        self.assertEqual(find_album_by_id(1), 'hello')
</code>```

However, I am trying to understand how this would work with the with keyword involved in the code logic which I am using in my project. This is how I changed the method

```<code>def find_album_by_id(id):
    url = f'https://jsonplaceholder.typicode.com/albums/{id}'
    with requests.get(url) as response:
        pipelines = response.json()
    if response.status_code == 200:
        return pipelines['title']
    else:
        return None
</code>```

Here is my current test:

```<code>   @patch('album.requests.get')
    def test_find_album_by_id_success(self, mock_requests):
        mock_response = MagicMock()
        mock_response.status_code = 200
        mock_response.pipelines.response.json = {
            'userId': 1,
            'id': 1,
            'title': 'hello',
        }

        mock_requests.return_value.json.return_value = mock_response

        self.assertEqual(find_album_by_id(1), 'hello')
</code>```

Thanks

I have tried debugging the test and it just never receives the status code of 200 so I am not sure I am mocking response correctly at all? From my understanding the mock_response is supposed to have that status code of 200 but breakline indicates that response is just a MagicMock with nothing in it.

Body:
I am having trouble understanding how mocking works when the get responses involve using the with keyword. Here is an example I am following for my class `Album' and I have been successful when I am mocking a url as seen below:

def find_album_by_id(id):
    url = f'https://jsonplaceholder.typicode.com/albums/{id}'
    response = requests.get(url)
    if response.status_code == 200:
        return response.json()['title']
    else:
        return None

Here the test

class TestAlbum(unittest.TestCase):

    @patch('album.requests')
    def test_find_album_by_id_success(self, mock_requests):
        # mock the response
        mock_response = MagicMock()
        mock_response.status_code = 200
        mock_response.json.return_value = {
            'userId': 1,
            'id': 1,
            'title': 'hello',
        }

        # specify the return value of the get() method
        mock_requests.get.return_value = mock_response

        # call the find_album_by_id and test if the title is 'hello'
        self.assertEqual(find_album_by_id(1), 'hello')

However, I am trying to understand how this would work with the with keyword involved in the code logic which I am using in my project. This is how I changed the method

def find_album_by_id(id):
    url = f'https://jsonplaceholder.typicode.com/albums/{id}'
    with requests.get(url) as response:
        pipelines = response.json()
    if response.status_code == 200:
        return pipelines['title']
    else:
        return None

Here is my current test:

   @patch('album.requests.get')
    def test_find_album_by_id_success(self, mock_requests):
        mock_response = MagicMock()
        mock_response.status_code = 200
        mock_response.pipelines.response.json = {
            'userId': 1,
            'id': 1,
            'title': 'hello',
        }

        mock_requests.return_value.json.return_value = mock_response

        self.assertEqual(find_album_by_id(1), 'hello')

Thanks

I have tried debugging the test and it just never receives the status code of 200 so I am not sure I am mocking response correctly at all? From my understanding the mock_response is supposed to have that status code of 200 but breakline indicates that response is just a MagicMock with nothing in it.


问:
save a big xlsx file into my mysql database
I have a big xlsx file to save into my database. my xlsx file is large almost 160000 rows in it so does anybody have an easy way to import it into my SQL?

I tried to import it using PHPMyAdmin by converting it into CSV file
and I also tried

```<code>Select Col1, Col7, Col4
From c:\temp\CSV_File
into Table_target (Col22, Col4, Col9)
</code>```

this gives me an error

```<code>Unexpected ordering of clauses. (near "From" at position 104)
</code>```

also if you know any better ideas please share.
thank you for the answer.

Body:
I have a big xlsx file to save into my database. my xlsx file is large almost 160000 rows in it so does anybody have an easy way to import it into my SQL?

I tried to import it using PHPMyAdmin by converting it into CSV file
and I also tried

Select Col1, Col7, Col4
From c:\temp\CSV_File
into Table_target (Col22, Col4, Col9)

this gives me an error

Unexpected ordering of clauses. (near "From" at position 104)

also if you know any better ideas please share.
thank you for the answer.


问:
react component animated using transition group does not display recieved property correctly
I'm trying to add some simple fade animations to component which displays information about marvel character chosen in another component (characters list). When I use  in my component (BasicCharacterInfo), it is being rendered multiple times and besides on first render it displays comics and then it rerenders instantly without comics.

Here is code:

```<code>import { Skeleton } from '@mui/material';
import { useEffect, useState } from 'react';
import { Link } from 'react-router-dom';
import Transition from 'react-transition-group/Transition';

import useMarvelService from '../../services/MarvelService';
import ErrorMessage from '../errorMessage/ErrorMessage';

import './charInfo.scss';

// Creating element with photo and description of character
function BasicCharacterInfo({
  data: {
    name,
    description,
    thumbnail,
    urls: { charHomePage, charWikiPage },
    comics,
  },
}) {
  const [readyToDisplay, setReadyToDisplay] = useState(() => false);

  console.log('COMICS === ' + comics.length);

  useEffect(() => setReadyToDisplay(true), []);

  let descriptionToDisplay;
  if (description) {
    const splitDescription = description.split(' ');
    if (splitDescription.length >= 124) {
      descriptionToDisplay = splitDescription.splice(0, 124).join(' ');
    }
    descriptionToDisplay = description;
  }

  const transitionStyles = {
    entering: { opacity: 1, transition: 'all 200ms ease' },
    entered: { opacity: 1, transition: 'all 200ms ease' },
    exiting: { opacity: 0, transition: 'all 200ms ease' },
    exited: { opacity: 0, transition: 'all 200ms ease' },
  };

  return (
    <Transition
      in={readyToDisplay}
      timeout={{ enter: 100, exit: 500 }}
      mountOnEnter
      unmountOnExit
    >
      {state => (
        <div style={{ ...transitionStyles[state] }}>
          <div className="char__basics">
            <img src={thumbnail} alt={name} />
            <div>
              <div className="char__info-name">{name}</div>
              <div className="char__btns">
                <a href={charHomePage} className="button button__main">
                  <div className="inner">homepage</div>
                </a>
                <a href={charWikiPage} className="button button__secondary">
                  <div className="inner">wiki</div>
                </a>
              </div>
            </div>
          </div>
          <div className="char__descr">
            {descriptionToDisplay || 'No description for this character...'}
          </div>
          <div className="char__comics">Comics:</div>
          <ul className="char__comics-list">
            {comics.length
              ? comics.splice(0, 10).map(({ name, resourceURI }) => {
                  const comicId = resourceURI.split('/').at(-1);
                  return (
                    <li className="char__comics-item" key={comicId}>
                      <Link to={`/comic/${comicId}`}>{name}</Link>
                    </li>
                  );
                })
              : 'No comics found for this character'}
          </ul>
        </div>
      )}
    </Transition>
  );
}

// Skeleton for loading
const CharacterInfoLoadingSkeleton = ({ initialTitle }) => {
  const title = initialTitle ? (
    <p
      style={{
        fontWeight: 'bold',
        fontSize: '18px',
        textAlign: 'center',
        margin: '5px 0 10px',
      }}
    >
      {initialTitle}
    </p>
  ) : null;

  return (
    <>
      {title}
      <Skeleton variant="circular" width={80} height={80} animation="wave" />
      <Skeleton
        style={{ margin: '15px 0' }}
        variant="rectangular"
        height={150}
        animation="wave"
      />
      <Skeleton animation="wave" />
      <Skeleton animation="wave" />
      <Skeleton animation="wave" />
    </>
  );
};

// Main function component
const CharInfo = props => {
  // State
  const [chosenCharacter, setChosenCharacter] = useState(null);
  const [initialTitle, setInitialTitle] = useState(
    'Choose character from list on the left'
  );

  const { fetchSingleCharacter, loading, error } = useMarvelService();

  // State managment
  const onNewCharacterId = newCharacter =>
    setChosenCharacter(() => newCharacter);

  // Update character
  const updateCharacterInfo = () => {
    if (!props.characterId) {
      return;
    }

    // Fetch clicked character, store it into state and stop loading
    // also call onError function if error occures
    return fetchSingleCharacter(props.characterId)
      .then(response => {
        setInitialTitle(null);
        return onNewCharacterId(response);
      })
      .catch(e => {
        throw e;
      })
      .finally();
  };

  // Updating character when component is mounted to display its info
  // eslint-disable-next-line
  useEffect(() => updateCharacterInfo, []);

  // Updating character to display its info
  useEffect(() => {
    async function fetchData() {
      return await updateCharacterInfo();
    }
    fetchData();
    // eslint-disable-next-line
  }, [props.characterId]);

  const content =
    !loading && !error && chosenCharacter ? (
      <>
        <BasicCharacterInfo data={chosenCharacter} />
      </>
    ) : error ? (
      <ErrorMessage />
    ) : (
      <CharacterInfoLoadingSkeleton initialTitle={initialTitle} />
    );

  return <div className="char__info">{content}</div>;
};

export default CharInfo;

</code>```

I am trying to add animations with react-transition-goup but its' behavior is not correct.

Body:
I'm trying to add some simple fade animations to component which displays information about marvel character chosen in another component (characters list). When I use  in my component (BasicCharacterInfo), it is being rendered multiple times and besides on first render it displays comics and then it rerenders instantly without comics.

Here is code:

import { Skeleton } from '@mui/material';
import { useEffect, useState } from 'react';
import { Link } from 'react-router-dom';
import Transition from 'react-transition-group/Transition';

import useMarvelService from '../../services/MarvelService';
import ErrorMessage from '../errorMessage/ErrorMessage';

import './charInfo.scss';

// Creating element with photo and description of character
function BasicCharacterInfo({
  data: {
    name,
    description,
    thumbnail,
    urls: { charHomePage, charWikiPage },
    comics,
  },
}) {
  const [readyToDisplay, setReadyToDisplay] = useState(() => false);

  console.log('COMICS === ' + comics.length);

  useEffect(() => setReadyToDisplay(true), []);

  let descriptionToDisplay;
  if (description) {
    const splitDescription = description.split(' ');
    if (splitDescription.length >= 124) {
      descriptionToDisplay = splitDescription.splice(0, 124).join(' ');
    }
    descriptionToDisplay = description;
  }

  const transitionStyles = {
    entering: { opacity: 1, transition: 'all 200ms ease' },
    entered: { opacity: 1, transition: 'all 200ms ease' },
    exiting: { opacity: 0, transition: 'all 200ms ease' },
    exited: { opacity: 0, transition: 'all 200ms ease' },
  };

  return (
    <Transition
      in={readyToDisplay}
      timeout={{ enter: 100, exit: 500 }}
      mountOnEnter
      unmountOnExit
    >
      {state => (

{name}

homepage

wiki

            {descriptionToDisplay || 'No description for this character...'}

Comics:

            {comics.length
              ? comics.splice(0, 10).map(({ name, resourceURI }) => {
                  const comicId = resourceURI.split('/').at(-1);
                  return (

                      <Link to={`/comic/${comicId}`}>{name}</Link>

                  );
                })
              : 'No comics found for this character'}

      )}
    </Transition>
  );
}

// Skeleton for loading
const CharacterInfoLoadingSkeleton = ({ initialTitle }) => {
  const title = initialTitle ? (

      {initialTitle}

  ) : null;

  return (
    <>
      {title}
      <Skeleton variant="circular" width={80} height={80} animation="wave" />
      <Skeleton
        style={{ margin: '15px 0' }}
        variant="rectangular"
        height={150}
        animation="wave"
      />
      <Skeleton animation="wave" />
      <Skeleton animation="wave" />
      <Skeleton animation="wave" />
    </>
  );
};

// Main function component
const CharInfo = props => {
  // State
  const [chosenCharacter, setChosenCharacter] = useState(null);
  const [initialTitle, setInitialTitle] = useState(
    'Choose character from list on the left'
  );

  const { fetchSingleCharacter, loading, error } = useMarvelService();

  // State managment
  const onNewCharacterId = newCharacter =>
    setChosenCharacter(() => newCharacter);

  // Update character
  const updateCharacterInfo = () => {
    if (!props.characterId) {
      return;
    }

    // Fetch clicked character, store it into state and stop loading
    // also call onError function if error occures
    return fetchSingleCharacter(props.characterId)
      .then(response => {
        setInitialTitle(null);
        return onNewCharacterId(response);
      })
      .catch(e => {
        throw e;
      })
      .finally();
  };

  // Updating character when component is mounted to display its info
  // eslint-disable-next-line
  useEffect(() => updateCharacterInfo, []);

  // Updating character to display its info
  useEffect(() => {
    async function fetchData() {
      return await updateCharacterInfo();
    }
    fetchData();
    // eslint-disable-next-line
  }, [props.characterId]);

  const content =
    !loading && !error && chosenCharacter ? (
      <>
        <BasicCharacterInfo data={chosenCharacter} />
      </>
    ) : error ? (
      <ErrorMessage />
    ) : (
      <CharacterInfoLoadingSkeleton initialTitle={initialTitle} />
    );

  return
{content}
;
};

export default CharInfo;

I am trying to add animations with react-transition-goup but its' behavior is not correct.


问:
Firefox equilivant to mask-border
I am creating a mask border for a webpage and there is one CSS property that I want to use which is mask-border. However, Firefox does not support it. Is there another property or technique that I can use that will create a mask border that is compatible in all browsers?</p>

Title: Firefox equilivant to mask-border