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

lp1981106: Remove wrong debug assertion about source synchronization time stamps #4847

Merged
merged 1 commit into from
Jul 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 7 additions & 10 deletions src/track/trackrecord.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,21 +166,18 @@ TrackRecord::SourceSyncStatus TrackRecord::checkSourceSyncStatus(
if (getSourceSynchronizedAt() < fileSourceSynchronizedAt) {
return SourceSyncStatus::Outdated;
}
// This could actually happen when users replace files with
// an older version on the file system. But it should never
// happen under normal operation. Otherwise it might indicate
// a serious programming error and we should detect it early
// before the release. Debug assertions are only enabled in
// development and testing versions.
VERIFY_OR_DEBUG_ASSERT(getSourceSynchronizedAt() <= fileSourceSynchronizedAt) {
kLogger.warning()
if (getSourceSynchronizedAt() > fileSourceSynchronizedAt) {
// The internal metadata has either been updated and not re-exported (yet)
// or the file has been replaced with an older version. In both cases the
// file metadata should not be re-imported implicitly and is considered
// as synchronized.
kLogger.debug()
<< "Internal source synchronization time stamp"
<< getSourceSynchronizedAt()
<< "is ahead of"
<< fileSourceSynchronizedAt
<< "for file"
<< mixxx::FileInfo(fileInfo)
<< ": Has this file been replaced with an older version?";
<< mixxx::FileInfo(fileInfo);
}
return SourceSyncStatus::Synchronized;
}
Expand Down
6 changes: 4 additions & 2 deletions src/track/trackrecord.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,12 @@ class TrackRecord final {
/// that allow to monitor the modification time of the file.
Unknown,

/// The metadata in Mixxx is up-to-date.
/// The metadata in Mixxx is up-to-date, i.e. not older than the
/// last modification time stamp of the underlying file.
Synchronized,

/// The metadata in Mixxx is older than the metadata stored in file tags.
/// The metadata in Mixxx is older than the metadata stored in file tags
/// and should be re-imported.
Outdated,

/// The status could not be determined for whatever reason,
Expand Down