Hi Team, I have a couple of queries regarding Apac...
# general
s
Hi Team, I have a couple of queries regarding Apache Pinot: 1. Does Pinot support segment compression formats other than
tar.gz
, such as zstd or Snappy? 2. I created an index on a column (
col1
) and ingested data. Suppose a segment contains 50 records, and I run a query with the condition
col1 = 'xyz'
. In this case, does Pinot load the entire segment into memory and then filter the records, or does it directly fetch only the matching data from the segment?
m
1. Pinot has its own compression techniques for storing data and index. For no-dict column it can be configured to use zstd / snappy. The tar.gz format is for storing in deepstore only. 2. segments are memory mapped and never really entirely loaded in memory. If you have index on the column it will fetch only the marching data
s
thanks! 🙇
Hi @Mayank I have a few questions about Pinot + DeepStore: 1. Does the server keep a local copy of all segments that are in DeepStore? If I ingest 5TB of data but my server has only 100GB of local storage, what happens? 2. If both DeepStore and the server store the same data, isn’t that duplication? 3. When does the server actually download data from DeepStore? Right after metadata is pushed to the controller? How does the controller tell the server where the data is? Is there a notification process? Where can I look in the code for this? 4. In a 10-node cluster with replication factor 3, one server going down doesn’t lose data. DeepStore only seems useful if all servers go down. But if DeepStore gets corrupted, Why not just increase the replication factor instead of using DeepStore? 5. What’s the difference between these two directories? ◦
pinot.server.instance.dataDir
→ seems to contain local data. ◦
pinot.server.instance.segmentTarDir
→ always empty for me, even with DeepStore. Why? 6. If I delete data from the server’s local directory, queries still work. How? When I reload a segment, it doesn’t seem to pull it back from DeepStore into the local directory. 7. In table config, what does MMAP mean? Is it direct memory mapping?
m
1. In OSS yes, but there is a tiered storage solution in closed source where it does not keep all data. 2. it is a distributed system, it needs to provide fault tolerance, disaster recovery etc 3. Yes controller notifies server using Helix. 4. What if all servers go down? Or you want to scale down and then scale back up later. What if server loses its disk? 5. I don’t recall, tarDie might be temporary location to download tar files. 6. did you delete from all replicas? 7. it is to memory map segment on disk, but not in direct memory. You can google how memory mapping works
s
did you delete from all replicas?
Yes, i deleted all the replicas
m
There is no way queries return results if servers don’t have data.
s
If it is returning the result after deleting data from the server’s local directory, what could be the possible reason?
m
I am saying if data is truely delete and unmapped from server, there is absolutely no way query can return results.
I am not sure what operations you did, so my guess is what you think you did and what actually happened are not the same thing.
s
Does it cache data?
m
How did you delete the segments?
Can you share screen shots that prove that data is deleted
And can you share screen shot that query actually returned correct results?
s
I deleted all the files from this directory:
pinot.server.instance.dataDir
, and reloaded the segments without restarting the server.
m
You did \rm -fr? Or you called the delete api?
Reloading will always download from deepstore if data is not present in servers' dataDir
Server restart is not needed for that.
s
You did rm -rf
yes, i did this
m
And then you called reload api - this would have re-downloaded the segments from deepstore to server.
s
But I can't see the data in the server's local directory. If it actually downloads the data from deep store, it should keep it in the server's local directory.
m
I think you might be looking in the wrong place
You can check server log. it should log when it downloaded the segments.
🫡 1
If you don't see any download message then it means you are looking in the wrong dir. You can check server log, at startup it should log the dataDir it used.
High level question, what are you tyring to do here? Is this just for your understanding, or you are trying to fix some issue you ran into?
s
> 2025/08/23 233451.426 INFO [QueryLogger] [jersey-server-managed-async-executor-6] requestId=1452998218000000006,table=user_batch,timeMs=22,docs=16/7998,entries=0/80,segments(queried/processed/matched/consumingQueried/consumingProcessed/consumingMatched/unavailable):9/4/4/0/0/0/0,consumingFreshnessTimeMs=0,servers=1/1,groupLimitReached=false,brokerReduceTimeMs=0,exceptions=0,serverStats=(Server=SubmitDelayMs,ResponseDelayMs,ResponseSize,DeserializationTimeMs,RequestSentDelayMs);localhost_O=2,15,694,1,2,offlineThreadCpuTimeNs(total/thread/sysActivity/resSer):0/0/0/0,realtimeThreadCpuTimeNs(total/thread/sysActivity/resSer):0/0/0/0,clientIp=unknown,query=select * from user_batch limit 10 > 2025/08/23 233503.307 INFO [QueryLogger] [jersey-server-managed-async-executor-7] requestId=1452998218000000007,table=user_batch,timeMs=9,docs=16/7998,entries=0/80,segments(queried/processed/matched/consumingQueried/consumingProcessed/consumingMatched/unavailable):9/4/4/0/0/0/0,consumingFreshnessTimeMs=0,servers=1/1,groupLimitReached=false,brokerReduceTimeMs=0,exceptions=0,serverStats=(Server=SubmitDelayMs,ResponseDelayMs,ResponseSize,DeserializationTimeMs,RequestSentDelayMs);localhost_O=0,7,685,0,1,offlineThreadCpuTimeNs(total/thread/sysActivity/resSer):0/0/0/0,realtimeThreadCpuTimeNs(total/thread/sysActivity/resSer):0/0/0/0,clientIp=unknown,query=select * from user_batch limit 10 > 2025/08/23 233503.829 INFO [QueryLogger] [jersey-server-managed-async-executor-7] requestId=1452998218000000008,table=user_batch,timeMs=9,docs=16/7998,entries=0/80,segments(queried/processed/matched/consumingQueried/consumingProcessed/consumingMatched/unavailable):9/4/4/0/0/0/0,consumingFreshnessTimeMs=0,servers=1/1,groupLimitReached=false,brokerReduceTimeMs=0,exceptions=0,serverStats=(Server=SubmitDelayMs,ResponseDelayMs,ResponseSize,DeserializationTimeMs,RequestSentDelayMs);localhost_O=0,6,694,1,1,offlineThreadCpuTimeNs(total/thread/sysActivity/resSer):0/0/0/0,realtimeThreadCpuTimeNs(total/thread/sysActivity/resSer):0/0/0/0,clientIp=unknown,query=select * from user_batch limit 10 > 2025/08/23 233504.208 INFO [QueryLogger] [jersey-server-managed-async-executor-7] requestId=1452998218000000009,table=user_batch,timeMs=8,docs=16/799WARN [SegmentLocalFSDirectory] [grizzly-http-server-10] Empty list of files for path: /tmp/pinot/data/server/index/user_batch_OFFLINE/prod_user_batch-1755846294280-000_batch_v1, segmentDirectory: /tmp/pinot/data/server/index/user_batch_OFFLINE/prod_user_batch-1755846294280-000_batch_v1/v3 > 2025/08/23 233220.604 WARN [SegmentLocalFSDirectory] [grizzly-http-server-10] Empty list of files for path: /tmp/pinot/data/server/index/user_batch_OFFLINE/prod_user_batch-1755846294947-000_batch_v1, segmentDirectory: /tmp/pinot/data/server/index/user_batch_OFFLINE/prod_user_batch-1755846294947-000_batch_v1/v3 Here, I can see a warning in the logs
Empty list of files for path: /tmp/pinot/data/server/index/user_batch_OFFLINE/prod_user_batch-1755846294280-000_batch_v1, segmentDirectory: /tmp/pinot/data/server/index/user_batch_OFFLINE/prod_user_batch-1755846294280-000_batch_v1/v3
m
Is this your configured dataDir?
Copy code
/tmp/pinot/data/server/index
s
yes
m
If so, never have dataDir on
/tmp
Files on
/tmp
can be deleted by the system any time
Is this server log or broker log?
Or are you running everything on a single node, and single JVM?
This is a broker log:
Copy code
2025/08/23 23:35:03.307 INFO [QueryLogger] [jersey-server-managed-async-executor-7] requestId=1452998218000000007,table=user_batch,timeMs=9,docs=16/7998,entries=0/80,segments(queried/processed/matched/consumingQueried/consumingProcessed/consumingMatched/unavailable):9/4/4/0/0/0/0,consumingFreshnessTimeMs=0,servers=1/1,groupLimitReached=false,brokerReduceTimeMs=0,exceptions=0,serverStats=(Server=SubmitDelayMs,ResponseDelayMs,ResponseSize,DeserializationTimeMs,RequestSentDelayMs);localhost_O=0,7,685,0,1,offlineThreadCpuTimeNs(total/thread/sysActivity/resSer):0/0/0/0,realtimeThreadCpuTimeNs(total/thread/sysActivity/resSer):0/0/0/0,clientIp=unknown,query=select * from user_batch limit 10
One thing that might happen is that since you didn't call the delete api but did
\rm -fr
(please never do that on a database), if there are memory mapped pages in memory that haven't been unmapped, it might read those. But that is just by chance, once the system pages those out, your query will fail.
So I'll ask my question again, what is it that you are really trying to do here? What was the purpose of that \rm -fr?
s
Yes, the tmp location (the default directory location in
server.conf
) is set on my local machine only for POC. The tmp files will be deleted once I restart the system. In production, it will point to a different location. During my POC, I deleted the files and then checked the behavior to see whether it would download the files from deep store or not, and I observed different behavior.
m
That is very basic functionality in Pinot, without that a distributed system won't work.
Think of thousands of deployments of Pinot where servers are replaced, nodes are recycled, data is lost, how will they work if this didn't work.
You are better off testing your PoC requirements.