alibaba / alibaba/DataX

mongodb集合为时间序列集合(time series collection) 时,reader时,collStats获取集合的count时,报空指针

Open
#1,651 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
17.4k
Forks
5.7k
PR merge metrics
No merged PRs in 30d

Description

Datax版本:https://datax-opensource.oss-cn-hangzhou.aliyuncs.com/202210/datax.tar.gz
Mongodb版本:5.0,6.0都有此问题

普通集合db.runCommand( { collStats : "xxx" } )是有count的:
![image](https://user-images.githubusercontent.com/16874450/209897857-2a27afcc-bd5a-454e-babd-ec0202d49beb.png)

但如果是时间序列的集合,是无count的:
![image](https://user-images.githubusercontent.com/16874450/209897870-0d833cbf-72e7-4382-8642-ccd8a39a697f.png)

所以针对时间序列集合,MongoDBReader会有问题,报空指针:
![image](https://user-images.githubusercontent.com/16874450/209897882-516861cb-ca92-4d2e-a75e-2eb2c9bf3b12.png)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the MongoDBReader path that calls collStats to obtain a collection count, and reproduce the behavior against MongoDB 5.0 or 6.0 using a time-series collection. Done means the reader no longer throws a null-pointer error when collStats omits count, while ordinary collections continue to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, mongodb
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.