ashwintumma23 commented on issue #17361:
URL: https://github.com/apache/druid/issues/17361#issuecomment-2423270369

   Hi @abhishekrb19, 
   ### For the `/version` endpoint: 
   #### Documentation-wise
   * It is indeed specified on the lookups-cached-global page, but, I think we 
should update the documentation to explicitly state that it is available only 
for the lookups of type `cachedNamespace`. I can create a PR for this item. 
   
   #### Functionality-wise
     * The introspection endpoint returns the internal version from 
CacheScheduler here 
https://github.com/apache/druid/blob/master/extensions-core/lookups-cached-global/src/main/java/org/apache/druid/query/lookup/NamespaceLookupIntrospectHandler.java#L78
 ; but it is different from the version that gets specified when creating the 
lookup. 
     * For instance, on the console, I see that lookup version is `v3`; but on 
the `/version` endpoint, it is shows: `{"version":"1729180607928"}`. [Attached 
screenshot below]. Currently, the API always returns the epoch value of the 
lookup creation time. 
     * Similar behavior is observed when the lookup is created by specifying 
`tier`, `lookup_name`, `version` and `lookupExtractorFactory` via the API 
endpoint: `/druid/coordinator/v1/lookups/config/`
     * **Impact:** This might confuse the users, as to which version is the 
correct version of the lookup.
     * **Behavior of other lookup endpoints:** All other non-introspection 
endpoints work correctly by fetching the `LookupExtractorFactoryMapContainer` 
map that contains `version` and `lookupExtractorFactory` separately.
     * Example: 
https://druid.apache.org/docs/latest/api-reference/lookups-api/#get-lookup 
endpoint correctly fetches the `version` and `lookupExtractorFactory` from 
`LookupExtractorFactoryMapContainer` here: 
https://github.com/apache/druid/blob/master/server/src/main/java/org/apache/druid/server/http/LookupCoordinatorResource.java#L304
 
     * As far as I know, the Introspection class 
(https://github.com/apache/druid/blob/master/extensions-core/lookups-cached-global/src/main/java/org/apache/druid/query/lookup/NamespaceLookupIntrospectHandler.java)
 does not have access to the `LookupExtractorFactoryMapContainer` object, hence 
the discrepancy in the return values of the `/version` endpoint. 
     * **Discussion:** What do you think can be done in this case? 
     * [Attachment] Screenshot showing lookup version as `v3`: 
   
![image](https://github.com/user-attachments/assets/feac7dac-28e4-468d-8893-e917fdd6e156)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to