Jackie-Jiang commented on code in PR #12346: URL: https://github.com/apache/pinot/pull/12346#discussion_r1476487009
########## pinot-common/src/main/java/org/apache/pinot/common/restlet/resources/ValidDocIdsType.java: ########## @@ -0,0 +1,50 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.pinot.common.restlet.resources; + +public enum ValidDocIdsType { + // Default validDocIds type. This indicates that the validDocIds bitmap is loaded from the snapshot from the + // Pinot segment. UpsertConfig's 'enableSnapshot' must be enabled for this type. + SNAPSHOT("snapshot"), + // This indicates that the validDocIds bitmap is loaded from the real-time server. + ON_HEAP("onHeap"), + // This indicates that the validDocIds bitmap is read from the real-time server. The valid document ids here does + // take account into the deleted records. UpsertConfig's 'deleteRecordColumn' must be provided for this type. + ON_HEAP_WITH_DELETE("onHeapWithDelete"); Review Comment: `IN_MEMORY_WITH_DELETE` ########## pinot-common/src/main/java/org/apache/pinot/common/restlet/resources/ValidDocIdsType.java: ########## @@ -0,0 +1,50 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.pinot.common.restlet.resources; + +public enum ValidDocIdsType { + // Default validDocIds type. This indicates that the validDocIds bitmap is loaded from the snapshot from the + // Pinot segment. UpsertConfig's 'enableSnapshot' must be enabled for this type. + SNAPSHOT("snapshot"), + // This indicates that the validDocIds bitmap is loaded from the real-time server. + ON_HEAP("onHeap"), Review Comment: `IN_MEMORY` might be better? Doesn't have to be on-heap ########## pinot-common/src/main/java/org/apache/pinot/common/restlet/resources/ValidDocIdMetadataInfo.java: ########## @@ -28,14 +28,19 @@ public class ValidDocIdMetadataInfo { private final long _totalValidDocs; private final long _totalInvalidDocs; private final long _totalDocs; + private final String _segmentCrc; + private final String _validDocIdsType; Review Comment: Consider storing it as enum (do the conversion early to prevent invalid type) ########## pinot-common/src/main/java/org/apache/pinot/common/restlet/resources/ValidDocIdsBitmapResponse.java: ########## @@ -0,0 +1,54 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.pinot.common.restlet.resources; + +import com.fasterxml.jackson.annotation.JsonProperty; + + +public class ValidDocIdsBitmapResponse { + private final String _segmentName; + private final String _segmentCrc; + private final String _validDocIdsType; Review Comment: Same here -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org