Skip to content

Commit

Permalink
resolved detekt error
Browse files Browse the repository at this point in the history
Signed-off-by: Ronnak Saxena <[email protected]>
  • Loading branch information
ronnaksaxena committed Sep 12, 2023
1 parent 1578d23 commit 581531d
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class ResponseInterceptor(

// Calculated the end time for the current shard index if it is a rollup index with data overlapp
@Suppress("SpreadOperator")
suspend fun getRollupEndTime(liveDataStartPoint: Long, rollupIndices: Array<String>, dateTargetField: String, shardRequestIndex: String): Long {
suspend fun getRollupEndTime(liveDataStartPoint: Long, rollupIndices: Array<String>, dateTargetField: String): Long {
// Build search request to find the maximum rollup timestamp <= liveDataStartPoint
val sort = SortBuilders.fieldSort("$dateTargetField.date_histogram").order(SortOrder.DESC)
val query = QueryBuilders.boolQuery()
Expand All @@ -141,7 +141,6 @@ class ResponseInterceptor(
val req = SearchRequest()
.source(searchSourceBuilder)
.indices(*rollupIndices)
logger.info("ronsax sending search request for endtiem of $shardRequestIndex")
val res = client.suspendUntil { search(req, it) }

try {
Expand Down Expand Up @@ -218,7 +217,7 @@ class ResponseInterceptor(
if ((liveDataStartPoint < rollupDataEndPoint) && isShardIndexRollup) {
// Start at 0, end at live data
logger.info("ronsax sending request to find rollup endtime for index: $shardRequestIndex")
val endTime = getRollupEndTime(liveDataStartPoint, rollupIndices, dateTargetField, shardRequestIndex)
val endTime = getRollupEndTime(liveDataStartPoint, rollupIndices, dateTargetField)
return Pair(0L, endTime)
}
}
Expand Down

0 comments on commit 581531d

Please sign in to comment.