-
Notifications
You must be signed in to change notification settings - Fork 324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bloodhound / Opensearch #4261
base: develop
Are you sure you want to change the base?
Bloodhound / Opensearch #4261
Conversation
7669b04
to
4b643a3
Compare
f331e51
to
1f6823e
Compare
To be aligned with the elasticsearch-ephemeral.
- Old ES is unfortunately incompatible to new Bloodhound
URL: http://0.0.0.0:5601 username: elastic password: changeme
We settled on OS 1.x.x with the infra team for now.
We won't run ElasticSearch and OpenSearch in parallel.
updateTeamSearchVisibilityInboundImpl :: forall r. (Member (Embed IO) r) => IndexedUserStoreConfig -> TeamId -> SearchVisibilityInbound -> Sem r () | ||
updateTeamSearchVisibilityInboundImpl cfg tid vis = | ||
void $ runInBothES cfg updateAllDocs | ||
where | ||
updateAllDocs :: ES.IndexName -> ES.BH (Sem r) () | ||
updateAllDocs idx = do | ||
r <- ES.updateByQuery idx query (Just script) | ||
r <- hoistBH (embed @IO) $ ES.performBHRequest . fmap fst . ES.keepBHResponse $ ESR.updateByQuery @Value idx query (Just script) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This handling of version conflicts is probably broken here. See bitemyapp/bloodhound#295
2b268b2
to
91ef5f0
Compare
networks: | ||
- demo_wire | ||
|
||
opensearch-dashboard: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dashboard! neat! is there a good place to mention that so people might notice?
# TODO: This should not refer to Sven's fork. Hope that we will get this | ||
# upstreamed soonish or push the branch to Wire's fork. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs to be done.
if ES.isSuccess resp | ||
then pure () | ||
else logAndThrow mkErr resp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if ES.isSuccess resp | |
then pure () | |
else logAndThrow mkErr resp | |
unless (ES.isSuccess resp) $ logAndThrow mkErr resp |
logAndThrow :: (Member TinyLog r, Member (Error MigrationException) r, Show e) => (String -> MigrationException) -> e -> Sem r a | ||
logAndThrow mkErr errMsg = do | ||
Log.warn $ | ||
Log.msg (Log.val ("An OpenSearch/ElasticSearch error appeared: " `BS.append` (encodeUtf8 . Text.pack . show) errMsg)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Log.msg (Log.val ("An OpenSearch/ElasticSearch error appeared: " `BS.append` (encodeUtf8 . Text.pack . show) errMsg)) | |
Log.msg (Log.val ("An OpenSearch/ElasticSearch error occurred: " `BS.append` (encodeUtf8 . Text.pack . show) errMsg)) |
case persistResponse of | ||
Left _ -> throw $ PersistVersionFailed v $ show persistResponse | ||
Right r -> | ||
if ES.idxDocId r == docIdText |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this still do something involving ES.isCreated
?
castResponse :: forall context1 val1 context2 val2. BHResponse context1 val1 -> BHResponse context2 val2 | ||
castResponse BHResponse {..} = BHResponse {..} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh? How does this work without casting the fields?
This should only be released in combination with an infrastructure migration from ElasticSearch 6 to OpenSearch 1.3.
Ticket: https://wearezeta.atlassian.net/browse/WPB-10715
Checklist
changelog.d