Caideyipi commented on PR #17516:
URL: https://github.com/apache/iotdb/pull/17516#issuecomment-4627973369

   Functional issues I noticed in this PR:
   
   - The PR does not compile against current master. After merging with latest 
master, the new OTLP classes still reference IClientSession.SqlDialect.TABLE, 
but IClientSession no longer has the nested SqlDialect enum; current code uses 
org.apache.iotdb.commons.queryengine.common.SqlDialect. Affected locations 
include OtlpService.java:97/117, OtlpIngestor.java:69, and 
OtlpSchemaInitializer.java:145.
   
   - The OTLP endpoint bypasses REST Basic auth and then writes as the 
configured IoTDB user, which defaults to  oot/root. With 
enable_rest_service=true, any unauthenticated caller to /rest/v1/otlp/** can 
create databases/tables and insert data as root. See 
AuthorizationFilter.java:62-69 and the default otlp_username / otlp_password 
config. This should probably require explicit enablement and 
authentication/token support, and should not default to root.
   
   - Schema initialization failures are swallowed, but the session is still 
cached as ready. OtlpSchemaInitializer.runDdl() only logs non-success 
statuses/exceptions, while OtlpService.openDatabaseSession() caches the session 
afterwards. If CREATE DATABASE/TABLE fails due to permission, transient errors, 
or partial DDL failure, later requests for that database will skip schema init 
forever and keep failing inserts. The initializer should fail the first ingest 
and avoid caching until all required DDL succeeds.
   
   - Missing OTLP fields are written as concrete defaults instead of nulls. 
OtlpTableBatch.bitMaps() returns fresh unmarked bitmaps, columnValues() fills 
missing string slots with empty Binary, and numeric columns keep Java default 
0. For logs, many event-specific fields are intentionally not set for other 
event types, so they become 


-- 
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]

Reply via email to