@@ -39,17 +39,19 @@ namespace NKikimr {
3939 return StatusFlagToSpaceColor (GetLocalStatusFlags ());
4040 }
4141
42- ESpaceColor GetLocalLogColor () const {
43- return StatusFlagToSpaceColor (GetLocalLogStatusFlags ());
44- }
45-
4642 // update state with flags received from local PDisk
47- void UpdateLocal (NPDisk::TStatusFlags flags) {
48- Update (SelfOrderNum, flags);
43+ void UpdateLocalChunk (NPDisk::TStatusFlags flags) {
44+ if (flags & NKikimrBlobStorage::StatusIsValid && flags != AtomicGet (ChunkFlags)) {
45+ AtomicSet (ChunkFlags, flags);
46+ Update (SelfOrderNum, flags | AtomicGet (LogFlags));
47+ }
4948 }
5049
5150 void UpdateLocalLog (NPDisk::TStatusFlags flags) {
52- AtomicSet (LogFlags, flags);
51+ if (flags & NKikimrBlobStorage::StatusIsValid && flags != AtomicGet (LogFlags)) {
52+ AtomicSet (LogFlags, flags);
53+ Update (SelfOrderNum, flags | AtomicGet (ChunkFlags));
54+ }
5355 }
5456
5557 void UpdateLocalFreeSpaceShare (ui64 freeSpaceShare24bit) {
@@ -64,6 +66,10 @@ namespace NKikimr {
6466 return static_cast <NPDisk::TStatusFlags>(AtomicGet (AllVDiskFlags[SelfOrderNum]));
6567 }
6668
69+ NPDisk::TStatusFlags GetLocalChunkStatusFlags () const {
70+ return static_cast <NPDisk::TStatusFlags>(AtomicGet (ChunkFlags));
71+ }
72+
6773 NPDisk::TStatusFlags GetLocalLogStatusFlags () const {
6874 return static_cast <NPDisk::TStatusFlags>(AtomicGet (LogFlags));
6975 }
@@ -84,6 +90,8 @@ namespace NKikimr {
8490 private:
8591 // Log space flags.
8692 TAtomic LogFlags = 0 ;
93+ // Chunk space flags.
94+ TAtomic ChunkFlags = 0 ;
8795 // Flag for every VDisk in the BlobStorage group
8896 TAtomic AllVDiskFlags[MaxVDisksInGroup];
8997 // Cached global flags (obtained by merging AllVDiskFlags)
0 commit comments