Skip to content

Commit

Permalink
Adding dev logs.
Browse files Browse the repository at this point in the history
Signed-off-by: AWSHurneyt <[email protected]>
  • Loading branch information
AWSHurneyt committed Jan 26, 2024
1 parent 7b113d1 commit c7842dd
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,12 @@ class TransportGetRemoteIndexesAction @Inject constructor(
return
}

val userStr = client.threadPool().threadContext
.getTransient<String>(ConfigConstants.OPENSEARCH_SECURITY_USER_INFO_THREAD_CONTEXT)
log.info("hurneyt TransportGetRemoteIndexesAction::userStr = {}", userStr)

client.threadPool().threadContext.stashContext().use {
client.threadPool().threadContext.putTransient(ConfigConstants.OPENSEARCH_SECURITY_USER_INFO_THREAD_CONTEXT, userStr)
scope.launch {
val clusterIndexesList = mutableListOf<ClusterIndexes>()

Expand Down Expand Up @@ -164,14 +169,9 @@ class TransportGetRemoteIndexesAction @Inject constructor(
ResolveIndexAction.Request.DEFAULT_INDICES_OPTIONS
)

val userStr = client.threadPool().threadContext
.getTransient<String>(ConfigConstants.OPENSEARCH_SECURITY_USER_INFO_THREAD_CONTEXT)
log.info("hurneyt TransportGetRemoteIndexesAction::userStr = {}", userStr)

return client.suspendUntil {
threadPool().threadContext.putTransient(ConfigConstants.OPENSEARCH_SECURITY_USER_INFO_THREAD_CONTEXT, userStr)
// TODO hurneyt: return aliases as well
admin().indices().resolveIndex(resolveRequest, it)
client.admin().indices().resolveIndex(resolveRequest, it)
}
}
private suspend fun getHealthStatuses(targetClient: Client, parsedIndexesNames: List<String>): ClusterHealthResponse {
Expand Down

0 comments on commit c7842dd

Please sign in to comment.