Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to find metrics in-mem mode when partitionList size is bigger then 3 #67

Open
yogev-lb opened this issue Mar 27, 2024 · 0 comments

Comments

@yogev-lb
Copy link

I tried to run in-memory mode and pushed thousands of metrics to the storage.

The datapoints span more then 1d - about 10 metrics 1 each minute.

partition-size is 1h which is the default, retention is 14d which is the default.

I've noticed that once the 3rd partitionList is generated the following method will be invoked flushPartitions and the following code will delete the older partition:

		if s.inMemoryMode() {
			if err := s.partitionList.remove(part); err != nil {
				return fmt.Errorf("failed to remove partition: %w", err)
			}
			continue
		}

This will cause Select to fail on metrics that were part of the first partition that was removed.

I don't understand what does flush mean for in-memory. I guess it should be no-op and the only method that should delete partitions is: removeExpiredPartitions

I understand for disk storage we would like to flush the partition to disk for persistence but the current code will not hold more then 2 partitions in-memory at all times.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant