Skip to content

JAMES-3516 Implement ThreadIdGuessingAlgorithm for Distributed module#554

Merged
Arsnael merged 2 commits into
apache:masterfrom
quantranhong1999:threadIdGuessingForCassandraModule
Aug 5, 2021
Merged

JAMES-3516 Implement ThreadIdGuessingAlgorithm for Distributed module#554
Arsnael merged 2 commits into
apache:masterfrom
quantranhong1999:threadIdGuessingForCassandraModule

Conversation

@quantranhong1999
Copy link
Copy Markdown
Member

@quantranhong1999 quantranhong1999 commented Jul 27, 2021

The problem now is that the new message can't find related thread data from the thread table.
My guess is the Cassandra write is not finished yet before other new messages coming, or maybe even my code writing to Cassandra is not working.
I am working on this.

@quantranhong1999 quantranhong1999 marked this pull request as ready for review July 27, 2021 11:03
@quantranhong1999
Copy link
Copy Markdown
Member Author

quantranhong1999 commented Jul 27, 2021

At DistributedThreadGetTest:

  • I added await for ES to ensure it can index all-new message
  • I debugged a test that adds new related messages: they have the same threadId => So guessThreadId API works properly now.
    But then get that thread do not work properly. The thread with 3 message id just returns 1 message id.

At CassandraThreadIdGuessingAlgorithmTest which uses SimpleMessageSearchIndex does not work properly also.

This is really weird. My guess is we have a bug when SearchIndex indexes/query threadId which wraps CassandraMessageId (because it still works properly with InMemoryMessageId).

Copy link
Copy Markdown
Contributor

@chibenwa chibenwa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me ;-)

Copy link
Copy Markdown
Contributor

@chibenwa chibenwa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you squash @quantranhong1999 ?

@quantranhong1999 quantranhong1999 force-pushed the threadIdGuessingForCassandraModule branch from 2b41b43 to e8f9310 Compare July 29, 2021 08:55
@quantranhong1999
Copy link
Copy Markdown
Member Author

Can you squash @quantranhong1999 ?

Done. We need this to be merged #550. Then I can remove the NO REVIEW commit.

…dId not from naive ThreadId

This change allows CassandraMessageMapper save mailbox message with guessed ThreadId.
@quantranhong1999 quantranhong1999 force-pushed the threadIdGuessingForCassandraModule branch from e8f9310 to bc39f03 Compare August 3, 2021 03:07
@quantranhong1999
Copy link
Copy Markdown
Member Author

The CI build failed with weird errors. Can someone restart it?

@Arsnael
Copy link
Copy Markdown
Contributor

Arsnael commented Aug 3, 2021

yes maybe a network issue with jib. I restarted the build

@quantranhong1999
Copy link
Copy Markdown
Member Author

org.apache.james.backends.es.v7.ElasticSearchIndexerTest.deleteMessagesShouldNotThrowWhenEmptyList

Failing for the past 1 build (Since Failed#8 )
Took 0 ms.
Error Message
Could not initialize class org.apache.james.backends.es.v7.DockerElasticSearchSingleton
Stacktrace
java.lang.NoClassDefFoundError: Could not initialize class org.apache.james.backends.es.v7.DockerElasticSearchSingleton
	at org.apache.james.backends.es.v7.ElasticSearchIndexerTest.<init>(ElasticSearchIndexerTest.java:61)

These seem not related, green on my local btw.

@Arsnael
Copy link
Copy Markdown
Contributor

Arsnael commented Aug 3, 2021

Looks like it's not... restarted

@Arsnael Arsnael merged commit 0d0ceb0 into apache:master Aug 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants